badwords: fix issues found in tests

There remain some false positives, hits in test data, and `dir` use,
around 100 issues in total.

There is no plan to enforce badwords on tests.

Also:
- badwords.txt: let a few `manpage[s]` occurrences through
  (in Perl code).

Closes #19541
This commit is contained in:
Viktor Szakats 2025-11-15 00:27:38 +01:00
parent f0de14168a
commit a87383828e
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
247 changed files with 594 additions and 595 deletions

View file

@ -97,7 +97,7 @@ void logmsg(const char *msg, ...)
}
sec = epoch_offset + tv.tv_sec;
/* !checksrc! disable BANNEDFUNC 1 */
now = localtime(&sec); /* not thread safe but we don't care */
now = localtime(&sec); /* not thread safe but we do not care */
snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld",
(int)now->tm_hour, (int)now->tm_min, (int)now->tm_sec,
@ -227,7 +227,7 @@ int write_pidfile(const char *filename)
pidfile = fopen(filename, "wb");
if(!pidfile) {
char errbuf[STRERROR_LEN];
logmsg("Couldn't write pid file: %s (%d) %s", filename,
logmsg("Could not write pid file: %s (%d) %s", filename,
errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
return 0; /* fail */
}
@ -243,7 +243,7 @@ int write_portfile(const char *filename, int port)
FILE *portfile = fopen(filename, "wb");
if(!portfile) {
char errbuf[STRERROR_LEN];
logmsg("Couldn't write port file: %s (%d) %s", filename,
logmsg("Could not write port file: %s (%d) %s", filename,
errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
return 0; /* fail */
}