summaryrefslogtreecommitdiffstats
path: root/common.c
diff options
context:
space:
mode:
authorLuiz Fernando Capitulino <lcapitulino@mandriva.com>2009-02-05 12:30:17 +0000
committerLuiz Fernando Capitulino <lcapitulino@mandriva.com>2009-02-05 12:30:17 +0000
commit657f43a23250f33a0f2d53e1515bbe24908b7aa0 (patch)
tree25571717f937979828a817602bda3eb2725e185a /common.c
parente02b05e224276b65d7836d88061c88423dbad229 (diff)
downloadldetect-657f43a23250f33a0f2d53e1515bbe24908b7aa0.tar
ldetect-657f43a23250f33a0f2d53e1515bbe24908b7aa0.tar.gz
ldetect-657f43a23250f33a0f2d53e1515bbe24908b7aa0.tar.bz2
ldetect-657f43a23250f33a0f2d53e1515bbe24908b7aa0.tar.xz
ldetect-657f43a23250f33a0f2d53e1515bbe24908b7aa0.zip
- Fix 'ret may be used uninitialized' warning by initializing
it with the standard error code
Diffstat (limited to 'common.c')
-rw-r--r--common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common.c b/common.c
index 08dd449..bcc614d 100644
--- a/common.c
+++ b/common.c
@@ -81,7 +81,7 @@ fh fh_open(const char *name) {
}
char* fh_gets(char *line, int size, fh *f) {
- char *ret;
+ char *ret = NULL;
switch (f->gztype) {
case ZLIB:
ret = gzgets(f->u.zlib_fh, line, size);
@@ -94,7 +94,7 @@ char* fh_gets(char *line, int size, fh *f) {
}
int fh_close(fh *f) {
- int ret;
+ int ret = EOF;
switch (f->gztype) {
case ZLIB:
ret = gzclose(f->u.zlib_fh);