]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev/net_id: use STRLEN() to make code clearer
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 17 Dec 2021 10:35:50 +0000 (11:35 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 17 Dec 2021 10:45:55 +0000 (11:45 +0100)
commit3c1af24182dfe024ca236ff83118645183cd5e6a
treee274ebea92880a23d298d35af0fcea47b15a6ca5
parentbe0586610ebe651ceec15649d1ac2b2fe096eb3b
udev/net_id: use STRLEN() to make code clearer

The code was correct, but looked suspicious: we were comparing
strlen(x) with sizeof(y), with looks like an off-by-one. But we actually
want x to be one longer than y, so that's fine. Let's use STRLEN() to
make this more obvious.

While at it, drop unnecessary "_" prefix.
src/udev/udev-builtin-net_id.c