all repos — tint2 @ 03dd8b848340be20fd17ab566a051954ab87866a

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

uevent: Use strchr here
o9000 o9000
commit

03dd8b848340be20fd17ab566a051954ab87866a

parent

553adbb946b968b1d6230ce2e4d0327b1291e8f4

1 files changed, 6 insertions(+), 8 deletions(-)

jump to
M src/util/uevent.csrc/util/uevent.c

@@ -80,14 +80,12 @@ buffer[size-1] = '\0';

for (; s < end; s += strlen(s) + 1) { if (first) { - const char *p; - for (p = s; *p != '@'; p++) { - if (!*p) { - /* error: kernel events contain @ */ - /* triggered by udev events, though */ - free(ev); - return NULL; - } + const char *p = strchr(s, '@'); + if (!p) { + /* error: kernel events contain @ */ + /* triggered by udev events, though */ + free(ev); + return NULL; } ev->path = strdup(p+1); first = FALSE;