patch(1): replace strnlen() with a simpler strlen().

Small style fix with here.

Pointed out by:	kib
This commit is contained in:
pfg 2017-01-02 18:27:35 +00:00
parent 4c46075e32
commit 4287adb9b9

View File

@ -749,10 +749,10 @@ rej_line(int ch, LINENUM i)
size_t len;
const char *line = pfetch(i);
len = strnlen(line, USHRT_MAX);
len = strlen(line);
fprintf(rejfp, "%c%s", ch, line);
if (len == 0 || line[len-1] != '\n') {
if (len == 0 || line[len - 1] != '\n') {
if (len >= USHRT_MAX)
fprintf(rejfp, "\n\\ Line too long\n");
else