projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c04a432
)
compat/getdelim: Silence a warning about mixing of signed/unsigned.
author
Carl Worth
<cworth@cworth.org>
Tue, 1 Dec 2009 22:12:01 +0000
(14:12 -0800)
committer
Carl Worth
<cworth@cworth.org>
Wed, 2 Dec 2009 00:27:35 +0000
(16:27 -0800)
If the length is ever so large as to overflow, then we'll end up
returning a negative value (which indicates an error anyway).
compat/getdelim.c
patch
|
blob
|
history
diff --git
a/compat/getdelim.c
b/compat/getdelim.c
index 84bef87b09b644149a9127feb1667edcfc549126..1bedef7c903ccb1b2296ef59d674a6d2f898f067 100644
(file)
--- 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 */