diff options
author | Denys Vlasenko | 2018-07-31 16:50:26 +0200 |
---|---|---|
committer | Denys Vlasenko | 2018-07-31 16:50:26 +0200 |
commit | c16ae469ef132d7250a509ef5ccf3420e2fc567f (patch) | |
tree | 4973baacabfcc682898844c7d4f26814d367b30c /sysklogd/klogd.c | |
parent | 3d07446cef196c8c6f92a4d8006a56d348fca062 (diff) | |
download | busybox-c16ae469ef132d7250a509ef5ccf3420e2fc567f.zip busybox-c16ae469ef132d7250a509ef5ccf3420e2fc567f.tar.gz |
klogd: code shrink
function old new delta
klogd_main 511 486 -25
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'sysklogd/klogd.c')
-rw-r--r-- | sysklogd/klogd.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index a1552ed..25ddf31 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c @@ -275,10 +275,13 @@ int klogd_main(int argc UNUSED_PARAM, char **argv) priority = LOG_INFO; if (*start == '<') { start++; - if (*start) - priority = strtoul(start, &start, 10); - if (*start == '>') - start++; + if (*start) { + char *end; + priority = strtoul(start, &end, 10); + if (*end == '>') + end++; + start = end; + } } /* Log (only non-empty lines) */ if (*start) |