summaryrefslogtreecommitdiff
path: root/src/str.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2010-08-26 01:34:13 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2010-08-26 01:34:13 +0000
commit1255a914bae562cd9e17d88a52ba7f105f8fddf4 (patch)
tree2b57f3499886106002cea071389c9de827b4f8b8 /src/str.c
parent8b96666c7c7dd4fc1b52fdb4b55bbc15ca0c071c (diff)
downloadlibast-1255a914bae562cd9e17d88a52ba7f105f8fddf4.tar.gz
Revert and re-apply badnull patch
Revert previous patch generated by badnull.cocci script, and apply the new one. The main difference is that assert and assert-like functions are not touched anymore. SVN revision: 51650
Diffstat (limited to 'src/str.c')
-rw-r--r--src/str.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/str.c b/src/str.c
index 83b4ac3..c3ac4c7 100644
--- a/src/str.c
+++ b/src/str.c
@@ -230,8 +230,7 @@ spif_str_init_from_fp(spif_str_t self, FILE *fp)
self->s = (spif_charptr_t) MALLOC(self->size);
for (p = self->s; fgets((char *)p, buff_inc, fp); p += buff_inc) {
- if ((end = (spif_charptr_t)
- strchr((const char *)p, '\n')) == NULL) {
+ if (!(end = (spif_charptr_t)strchr((const char *)p, '\n'))) {
self->size += buff_inc;
self->s = (spif_charptr_t) REALLOC(self->s, self->size);
} else {