diff options
author | Michael Biebl <biebl@debian.org> | 2013-01-09 00:02:49 +0100 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2013-01-09 00:02:49 +0100 |
commit | 3793efd744861415cbb0e10df6ac9eab7b21e78e (patch) | |
tree | 41b82e478e0e35e6583057eb1196409265d4dabc /grammar | |
parent | ed0fad5385d95f30f7073bf3013e4ecabc4b29e4 (diff) | |
download | rsyslog-3793efd744861415cbb0e10df6ac9eab7b21e78e.tar.gz |
Imported Upstream version 7.2.5upstream/7.2.5
Diffstat (limited to 'grammar')
-rw-r--r-- | grammar/Makefile.in | 1 | ||||
-rw-r--r-- | grammar/rainerscript.c | 14 |
2 files changed, 10 insertions, 5 deletions
diff --git a/grammar/Makefile.in b/grammar/Makefile.in index 05d0fb8..ff11ca3 100644 --- a/grammar/Makefile.in +++ b/grammar/Makefile.in @@ -162,6 +162,7 @@ LIBLOGGING_CFLAGS = @LIBLOGGING_CFLAGS@ LIBLOGGING_LIBS = @LIBLOGGING_LIBS@ LIBLOGNORM_CFLAGS = @LIBLOGNORM_CFLAGS@ LIBLOGNORM_LIBS = @LIBLOGNORM_LIBS@ +LIBM = @LIBM@ LIBMONGO_CLIENT_CFLAGS = @LIBMONGO_CLIENT_CFLAGS@ LIBMONGO_CLIENT_LIBS = @LIBMONGO_CLIENT_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index 6b21bc9..0584d6a 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -463,17 +463,17 @@ doGetFileCreateMode(struct nvlst *valnode, struct cnfparamdescr *param, if(es_strlen(valnode->val.d.estr) == 4) { c = es_getBufAddr(valnode->val.d.estr); - if(!( (c[0] == '0') - && (c[1] >= '0' && c[1] <= '7') - && (c[2] >= '0' && c[2] <= '7') - && (c[3] >= '0' && c[3] <= '7') ) ) { + if( (c[0] == '0') + && (c[1] >= '0' && c[1] <= '7') + && (c[2] >= '0' && c[2] <= '7') + && (c[3] >= '0' && c[3] <= '7') ) { fmtOK = 1; } } if(fmtOK) { val->val.datatype = 'N'; - val->val.d.n = (c[1]-'0') * 64 + (c[2]-'0') * 8 + (c[3]-'0');; + val->val.d.n = (c[1]-'0') * 64 + (c[2]-'0') * 8 + (c[3]-'0'); } else { cstr = es_str2cstr(valnode->val.d.estr, NULL); parser_errmsg("file modes need to be specified as " @@ -1250,6 +1250,10 @@ evalStrArrayCmp(es_str_t *estr_l, struct cnfarray* ar, int cmpop) } else if(expr->r->nodetype != 'A') { \ cnfexprEval(expr->r, &r, usrptr); \ estr_r = var2String(&r, &bMustFree); \ + } else { \ + /* Note: this is not really necessary, but if we do not */ \ + /* do it, we get a very irritating compiler warning... */ \ + estr_r = NULL; \ } #define FREE_TWO_STRINGS \ |