summaryrefslogtreecommitdiffstats
path: root/grammar/rainerscript.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-11-28 10:11:14 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-11-28 10:11:14 +0100
commitf161dfefd2455547847f0355b7a3a87063780a43 (patch)
tree8cad7e652091bfa642af77b75e496b8c0bfecf26 /grammar/rainerscript.c
parentd9df6e977554f0bd1d42093ea62ca15dab223ff3 (diff)
downloadrsyslog-f161dfefd2455547847f0355b7a3a87063780a43.tar.gz
rsyslog-f161dfefd2455547847f0355b7a3a87063780a43.tar.bz2
rsyslog-f161dfefd2455547847f0355b7a3a87063780a43.zip
silence some primarily cosmetic compiler warning messages
Diffstat (limited to 'grammar/rainerscript.c')
-rw-r--r--grammar/rainerscript.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index 0dc505a7..f7f09697 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -2794,7 +2794,8 @@ cnfDoInclude(char *name)
if(result == GLOB_NOSPACE || result == GLOB_ABORTED) {
char errStr[1024];
rs_strerror_r(errno, errStr, sizeof(errStr));
- getcwd(cwdBuf, sizeof(cwdBuf));
+ if(getcwd(cwdBuf, sizeof(cwdBuf)) == NULL)
+ strcpy(cwdBuf, "??getcwd() failed??");
parser_errmsg("error accessing config file or directory '%s' [cwd:%s]: %s",
finalName, cwdBuf, errStr);
return 1;
@@ -2805,7 +2806,8 @@ cnfDoInclude(char *name)
if(stat(cfgFile, &fileInfo) != 0) {
char errStr[1024];
rs_strerror_r(errno, errStr, sizeof(errStr));
- getcwd(cwdBuf, sizeof(cwdBuf));
+ if(getcwd(cwdBuf, sizeof(cwdBuf)) == NULL)
+ strcpy(cwdBuf, "??getcwd() failed??");
parser_errmsg("error accessing config file or directory '%s' "
"[cwd: %s]: %s", cfgFile, cwdBuf, errStr);
return 1;