compat/getdelim: Silence a warning about mixing of signed/unsigned.

If the length is ever so large as to overflow, then we'll end up
returning a negative value (which indicates an error anyway).
This commit is contained in:
Carl Worth 2009-12-01 14:12:01 -08:00
parent c04a432ef2
commit 7fd7611b23

View file

@ -124,7 +124,7 @@ getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
break;
}
(*lineptr)[cur_len] = '\0';
result = cur_len ? cur_len : result;
result = cur_len ? (ssize_t) cur_len : result;
unlock_return:
funlockfile (fp); /* doesn't set errno */