summaryrefslogtreecommitdiffstats
path: root/grammar
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-06-05 10:52:51 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-06-05 10:52:51 +0200
commit61dbf692b3789e87bfaeb648c729787c81795d29 (patch)
treec0e89aa9107de4ff479bf7bd2db46aad8252c8df /grammar
parentb379e7d7a83cc2b0f5fc39fee7ef795a1bd0b51c (diff)
downloadrsyslog-61dbf692b3789e87bfaeb648c729787c81795d29.tar.gz
rsyslog-61dbf692b3789e87bfaeb648c729787c81795d29.tar.xz
rsyslog-61dbf692b3789e87bfaeb648c729787c81795d29.zip
restructured cfsysline handling a bit
so that we have cleaner code
Diffstat (limited to 'grammar')
-rw-r--r--grammar/rainerscript.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index 320e66d0..2752f4af 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -623,14 +623,13 @@ cnfactlstAddSysline(struct cnfactlst* actlst, char *line)
struct cnfcfsyslinelst *cflst;
if((cflst = malloc(sizeof(struct cnfcfsyslinelst))) != NULL) {
- cflst->next = NULL;
cflst->line = line;
if(actlst->syslines == NULL) {
- actlst->syslines = cflst;
+ cflst->next = NULL;
} else {
cflst->next = actlst->syslines;
- actlst->syslines = cflst;
}
+ actlst->syslines = cflst;
}
return actlst;
}