diff options
author | Kay Sievers <kay@vrfy.org> | 2012-04-16 20:27:44 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-04-16 20:54:17 +0200 |
commit | 33502ffe2eb7b56cdd018a4fb6830d7828519fad (patch) | |
tree | 02180c0a82618b09f7346edaa7b28dd93eb81c9f /src/udev/keymap/keymap.c | |
parent | 6ada823a9a0979ea145fd70add1007c21caa45c0 (diff) |
udev: use startswith() and streq()
Diffstat (limited to 'src/udev/keymap/keymap.c')
-rw-r--r-- | src/udev/keymap/keymap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udev/keymap/keymap.c b/src/udev/keymap/keymap.c index cc37a9b8c2..a2e43f92c0 100644 --- a/src/udev/keymap/keymap.c +++ b/src/udev/keymap/keymap.c @@ -40,6 +40,7 @@ const struct key* lookup_key (const char *str, unsigned int len); #include "keys-from-name.h" #include "keys-to-name.h" +#include "util.h" #define MAX_SCANCODES 1024 @@ -48,7 +49,7 @@ static int evdev_open(const char *dev) int fd; char fn[PATH_MAX]; - if (strncmp(dev, "/dev", 4) != 0) { + if (!startswith(dev, "/dev")) { snprintf(fn, sizeof(fn), "/dev/%s", dev); dev = fn; } |