projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1469b7
)
sysctl-util: per coding style, compare chars explicit against 0.
author
Lennart Poettering
<lennart@poettering.net>
Wed, 15 Sep 2021 07:23:56 +0000
(09:23 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 15 Sep 2021 14:32:40 +0000
(16:32 +0200)
src/basic/sysctl-util.c
patch
|
blob
|
history
diff --git
a/src/basic/sysctl-util.c
b/src/basic/sysctl-util.c
index 4e168dd48a16f165813cdbdf70e1b3fc8dc272c1..bb01d09696d03ba2ec43eeb1c9c38de2691e197a 100644
(file)
--- a/
src/basic/sysctl-util.c
+++ b/
src/basic/sysctl-util.c
@@
-38,7
+38,7
@@
char *sysctl_normalize(char *s) {
path_simplify(s);
/* Kill the leading slash, but keep the first character of the string in the same place. */
- if (
*s == '/' && *(s+1)
)
+ if (
s[0] == '/' && s[1] != 0
)
memmove(s, s+1, strlen(s));
return s;