patch(1): replace strnlen() with a simpler strlen().
Small style fix with here. Pointed out by: kib
This commit is contained in:
parent
4c46075e32
commit
4287adb9b9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user