1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

udev: strings in C are NUL-terminated anyway, no need to add a second NUL...

This commit is contained in:
Lennart Poettering 2014-11-30 00:21:49 +01:00
parent bf257aed05
commit 2783fe064b

View File

@ -1067,7 +1067,7 @@ static int add_rule(struct udev_rules *rules, char *line,
/* If we aren't at the end of the line, this is a parsing error. /* If we aren't at the end of the line, this is a parsing error.
* Make a best effort to describe where the problem is. */ * Make a best effort to describe where the problem is. */
if (!strchr(NEWLINE "\0", *linepos)) { if (!strchr(NEWLINE, *linepos)) {
char buf[2] = {*linepos}; char buf[2] = {*linepos};
_cleanup_free_ char *tmp; _cleanup_free_ char *tmp;