aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--logger.c2
-rw-r--r--sysklogd/logger.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/logger.c b/logger.c
index 21906401f..3d02979c8 100644
--- a/logger.c
+++ b/logger.c
@@ -130,6 +130,7 @@ extern int logger_main(int argc, char **argv)
130 while ((c = getc(stdin)) != EOF && i < sizeof(buf)) { 130 while ((c = getc(stdin)) != EOF && i < sizeof(buf)) {
131 buf[i++] = c; 131 buf[i++] = c;
132 } 132 }
133 buf[i++] = '\0';
133 message = buf; 134 message = buf;
134 } else { 135 } else {
135 len = 1; /* for the '\0' */ 136 len = 1; /* for the '\0' */
@@ -147,7 +148,6 @@ extern int logger_main(int argc, char **argv)
147 openlog(name, option, (pri | LOG_FACMASK)); 148 openlog(name, option, (pri | LOG_FACMASK));
148 syslog(pri, "%s", message); 149 syslog(pri, "%s", message);
149 closelog(); 150 closelog();
150
151 return EXIT_SUCCESS; 151 return EXIT_SUCCESS;
152} 152}
153 153
diff --git a/sysklogd/logger.c b/sysklogd/logger.c
index 21906401f..3d02979c8 100644
--- a/sysklogd/logger.c
+++ b/sysklogd/logger.c
@@ -130,6 +130,7 @@ extern int logger_main(int argc, char **argv)
130 while ((c = getc(stdin)) != EOF && i < sizeof(buf)) { 130 while ((c = getc(stdin)) != EOF && i < sizeof(buf)) {
131 buf[i++] = c; 131 buf[i++] = c;
132 } 132 }
133 buf[i++] = '\0';
133 message = buf; 134 message = buf;
134 } else { 135 } else {
135 len = 1; /* for the '\0' */ 136 len = 1; /* for the '\0' */
@@ -147,7 +148,6 @@ extern int logger_main(int argc, char **argv)
147 openlog(name, option, (pri | LOG_FACMASK)); 148 openlog(name, option, (pri | LOG_FACMASK));
148 syslog(pri, "%s", message); 149 syslog(pri, "%s", message);
149 closelog(); 150 closelog();
150
151 return EXIT_SUCCESS; 151 return EXIT_SUCCESS;
152} 152}
153 153