aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-12-01 14:12:01 -0800
committerGravatar Carl Worth <cworth@cworth.org>2009-12-01 16:27:35 -0800
commit7fd7611b23ad33ed8bb7db44916cb03bbc2c47c1 (patch)
tree800282411fad941379a126d2202b1391c948d468
parentc04a432ef201e090a8711b80ad7bb175b9719fa1 (diff)
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).
-rw-r--r--compat/getdelim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/getdelim.c b/compat/getdelim.c
index 84bef87b..1bedef7c 100644
--- a/compat/getdelim.c
+++ b/compat/getdelim.c
@@ -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 */