aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-05-04 06:12:55 -0400
committerMike Frysinger <vapier@gentoo.org>2015-05-04 06:12:55 -0400
commit7eb77555f12823a7b5763122b6817fb66eb2a89f (patch)
tree52541c02a11cb4602ab98d7a6d3b0d4bedb4aa91 /qcheck.c
parenttests: qmerge: fix running in nocolor mode (diff)
downloadportage-utils-7eb77555f12823a7b5763122b6817fb66eb2a89f.tar.gz
portage-utils-7eb77555f12823a7b5763122b6817fb66eb2a89f.tar.bz2
portage-utils-7eb77555f12823a7b5763122b6817fb66eb2a89f.zip
qcheck/qlop/qmerge/qxpak: fix spurious trailing u
The PRIu64 constant doesn't need its own "u" format as it's built in. For qcheck, this meant we generated invalid CONTENTS when updating. For the rest, it meant we had weird user facing output. Take this opportunity to add a qcheck testsuite. URL: https://bugs.gentoo.org/548262 Reported-by: Johnny Wezel <dev-jay@wezel.name>
Diffstat (limited to 'qcheck.c')
-rw-r--r--qcheck.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/qcheck.c b/qcheck.c
index 86d7aa6c..75dbf6d3 100644
--- a/qcheck.c
+++ b/qcheck.c
@@ -186,7 +186,7 @@ static int qcheck_process_contents(q_vdb_pkg_ctx *pkg_ctx, struct qcheck_opt_sta
if (state->chk_hash) {
const char *digest_disp;
if (state->qc_update)
- fprintf(fpx, "obj %s %s %"PRIu64"u\n", e->name, hashed_file, (uint64_t)st.st_mtime);
+ fprintf(fpx, "obj %s %s %"PRIu64"\n", e->name, hashed_file, (uint64_t)st.st_mtime);
switch (hash_algo) {
case HASH_MD5: digest_disp = "MD5"; break;
case HASH_SHA1: digest_disp = "SHA1"; break;
@@ -208,12 +208,12 @@ static int qcheck_process_contents(q_vdb_pkg_ctx *pkg_ctx, struct qcheck_opt_sta
if (state->chk_mtime) {
qcprintf(" %sMTIME%s: %s", RED, NORM, e->name);
if (verbose)
- qcprintf(" (recorded '%"PRIu64"u' != actual '%"PRIu64"u')", (uint64_t)e->mtime, (uint64_t)st.st_mtime);
+ qcprintf(" (recorded '%"PRIu64"' != actual '%"PRIu64"')", (uint64_t)e->mtime, (uint64_t)st.st_mtime);
qcprintf("\n");
/* This can only be an obj, dir and sym have no digest */
if (state->qc_update)
- fprintf(fpx, "obj %s %s %"PRIu64"u\n", e->name, e->digest, (uint64_t)st.st_mtime);
+ fprintf(fpx, "obj %s %s %"PRIu64"\n", e->name, e->digest, (uint64_t)st.st_mtime);
} else {
--num_files;
++num_files_ignored;
@@ -231,13 +231,13 @@ static int qcheck_process_contents(q_vdb_pkg_ctx *pkg_ctx, struct qcheck_opt_sta
if (state->chk_mtime) {
qcprintf(" %sMTIME%s: %s", RED, NORM, e->name);
if (verbose)
- qcprintf(" (recorded '%"PRIu64"u' != actual '%"PRIu64"u')",
+ qcprintf(" (recorded '%"PRIu64"' != actual '%"PRIu64"')",
(uint64_t)e->mtime, (uint64_t)st.st_mtime);
qcprintf("\n");
/* This can only be a sym */
if (state->qc_update)
- fprintf(fpx, "sym %s -> %s %"PRIu64"u\n", e->name, e->sym_target, (uint64_t)st.st_mtime);
+ fprintf(fpx, "sym %s -> %s %"PRIu64"\n", e->name, e->sym_target, (uint64_t)st.st_mtime);
} else {
--num_files;
++num_files_ignored;