From: Daniel Kahn Gillmor Date: Thu, 14 Apr 2022 00:45:21 +0000 (-0700) Subject: use "difference_count" instead of "differents" X-Git-Tag: 1.8.2-rc.1~15^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45a091f9bb8e10fcc0701681c8fa548707e2fb09;p=thirdparty%2Fldns.git use "difference_count" instead of "differents" "differents" is a peculiar idiom that some spellcheckers (like "codespell") think is a misspelling of either "different" or "difference". Clearer language is less likely to confuse both people and machines. --- diff --git a/pcat/pcat-diff.c b/pcat/pcat-diff.c index 4c57238e..592e5906 100644 --- a/pcat/pcat-diff.c +++ b/pcat/pcat-diff.c @@ -174,25 +174,25 @@ void print_known_differences(FILE *output) { size_t i; - size_t differents = 0; + size_t difference_count = 0; size_t total; double percentage; qsort(known_differences, known_differences_size, sizeof(known_differences_count), compare_known_differences); for (i = 0; i < known_differences_size; i++) { - differents += known_differences[i].count; + difference_count += known_differences[i].count; } - total = differents + sames; + total = difference_count + sames; for (i = 0; i < known_differences_size; i++) { - percentage = (double) (((double) known_differences[i].count / (double)differents) * 100.0); + percentage = (double) (((double) known_differences[i].count / (double)difference_count) * 100.0); fprintf(output, "%-48s", known_differences[i].descr); fprintf(output, "%8u\t(%02.2f%%)\n", (unsigned int) known_differences[i].count, percentage); } - fprintf(output, "Total number of differences: %u (100%%)\n", (unsigned int) differents); + fprintf(output, "Total number of differences: %u (100%%)\n", (unsigned int) difference_count); fprintf(output, "Number of packets the same after normalization: %u\n", (unsigned int) sames); fprintf(output, "Number of packets exactly the same on the wire: %u\n", (unsigned int) bytesames); fprintf(output, "Total number of packets inspected: %u\n", (unsigned int) total);