Give clang one less thing to complain about

"s"[i<2] and "s" + (i<2) are literally identical, but the latter triggers
a warning from clang because it looks so much like a noob is trying to
concatenate an integer and a string.  The former is arguably more clear.
This commit is contained in:
Larry Doolittle 2017-05-08 21:56:38 -07:00
parent dfb75d9b6c
commit 3c0a73822d
2 changed files with 2 additions and 2 deletions

View File

@ -965,7 +965,7 @@ static void pe_build_exports(struct pe_info *pe)
} else {
fprintf(op, "LIBRARY %s\n\nEXPORTS\n", dllname);
if (pe->s1->verbose)
printf("<- %s (%d symbol%s)\n", buf, sym_count, "s" + (sym_count < 2));
printf("<- %s (%d symbol%s)\n", buf, sym_count, "s"[sym_count < 2]);
}
#endif

View File

@ -390,7 +390,7 @@ usage:
}
if (v)
printf("<- %s (%d symbol%s)\n", outfile, i, "s" + (i<2));
printf("<- %s (%d symbol%s)\n", outfile, i, "s"[i<2]);
ret = 0;