projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d07446
)
klogd: code shrink
author
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 31 Jul 2018 14:50:26 +0000
(16:50 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 31 Jul 2018 14:50:26 +0000
(16:50 +0200)
function old new delta
klogd_main 511 486 -25
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
sysklogd/klogd.c
patch
|
blob
|
history
diff --git
a/sysklogd/klogd.c
b/sysklogd/klogd.c
index a1552ed13e2ccb942371ba400a8808634464f92f..25ddf3172f285ffdae2675b8ae2d8cfb1a92a78c 100644
(file)
--- 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)