aboutsummaryrefslogtreecommitdiff
path: root/sysklogd/logger.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysklogd/logger.c')
-rw-r--r--sysklogd/logger.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sysklogd/logger.c b/sysklogd/logger.c
index dfbc557ec..5ef622dc3 100644
--- a/sysklogd/logger.c
+++ b/sysklogd/logger.c
@@ -120,6 +120,7 @@ extern int logger_main(int argc, char **argv)
120 int fd, pri = LOG_USER|LOG_NOTICE; 120 int fd, pri = LOG_USER|LOG_NOTICE;
121 int fromStdinFlag=FALSE; 121 int fromStdinFlag=FALSE;
122 int toStdErrFlag=FALSE; 122 int toStdErrFlag=FALSE;
123 int stopLookingAtMeLikeThat=FALSE;
123 char *message, buf[1024], buf1[1024]; 124 char *message, buf[1024], buf1[1024];
124 time_t now; 125 time_t now;
125 size_t addrLength; 126 size_t addrLength;
@@ -129,7 +130,8 @@ extern int logger_main(int argc, char **argv)
129 if (*((*argv)+1) == '\0') { 130 if (*((*argv)+1) == '\0') {
130 fromStdinFlag=TRUE; 131 fromStdinFlag=TRUE;
131 } 132 }
132 while (*(++(*argv))) { 133 stopLookingAtMeLikeThat=FALSE;
134 while (*(++(*argv)) && stopLookingAtMeLikeThat==FALSE) {
133 switch (**argv) { 135 switch (**argv) {
134 case 's': 136 case 's':
135 toStdErrFlag = TRUE; 137 toStdErrFlag = TRUE;
@@ -139,10 +141,7 @@ extern int logger_main(int argc, char **argv)
139 usage(logger_usage); 141 usage(logger_usage);
140 } 142 }
141 pri = pencode(*(++argv)); 143 pri = pencode(*(++argv));
142 if (--argc == 0) { 144 stopLookingAtMeLikeThat=TRUE;
143 usage(logger_usage);
144 }
145 ++argv;
146 break; 145 break;
147 default: 146 default:
148 usage(logger_usage); 147 usage(logger_usage);