aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-07-31 16:50:26 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2018-07-31 16:50:26 +0200
commitc16ae469ef132d7250a509ef5ccf3420e2fc567f (patch)
tree4973baacabfcc682898844c7d4f26814d367b30c
parent3d07446cef196c8c6f92a4d8006a56d348fca062 (diff)
downloadbusybox-w32-c16ae469ef132d7250a509ef5ccf3420e2fc567f.tar.gz
busybox-w32-c16ae469ef132d7250a509ef5ccf3420e2fc567f.tar.bz2
busybox-w32-c16ae469ef132d7250a509ef5ccf3420e2fc567f.zip
klogd: code shrink
function old new delta klogd_main 511 486 -25 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--sysklogd/klogd.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c
index a1552ed13..25ddf3172 100644
--- a/sysklogd/klogd.c
+++ b/sysklogd/klogd.c
@@ -275,10 +275,13 @@ int klogd_main(int argc UNUSED_PARAM, char **argv)
275 priority = LOG_INFO; 275 priority = LOG_INFO;
276 if (*start == '<') { 276 if (*start == '<') {
277 start++; 277 start++;
278 if (*start) 278 if (*start) {
279 priority = strtoul(start, &start, 10); 279 char *end;
280 if (*start == '>') 280 priority = strtoul(start, &end, 10);
281 start++; 281 if (*end == '>')
282 end++;
283 start = end;
284 }
282 } 285 }
283 /* Log (only non-empty lines) */ 286 /* Log (only non-empty lines) */
284 if (*start) 287 if (*start)