Skip to content

Commit 64be0bf

Browse files
ericonrDuncaen
authored andcommitted
xbps-pkgdb: remove strerror message.
Also clean up macro in check.c.
1 parent 394306a commit 64be0bf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

bin/xbps-pkgdb/check.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ check_pkg_integrity(struct xbps_handle *xhp,
118118

119119
#define RUN_PKG_CHECK(x, name, arg) \
120120
do { \
121-
if ((rv = check_pkg_##name(x, pkgname, arg)) != 0) { \
121+
if (check_pkg_##name(x, pkgname, arg)) { \
122122
errors++; \
123123
} \
124124
} while (0)
@@ -135,5 +135,5 @@ do { \
135135

136136
#undef RUN_PKG_CHECK
137137

138-
return errors;
138+
return !!errors;
139139
}

bin/xbps-pkgdb/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ main(int argc, char **argv)
183183
} else {
184184
for (i = optind; i < argc; i++) {
185185
rv = check_pkg_integrity(&xh, NULL, argv[i]);
186-
if (rv < 0)
187-
xbps_error_printf("Failed to check "
188-
"`%s': %s\n", argv[i], strerror(-rv));
186+
if (rv != 0)
187+
fprintf(stderr, "Failed to check "
188+
"`%s'\n", argv[i]);
189189
}
190190
}
191191

0 commit comments

Comments
 (0)