From faa1ff8ef8d98fe148ac0efab15fcdf0cabdcaae Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Sun, 7 Jul 2013 11:07:06 -0400 Subject: Import strxcpyx from upstream This commit imports strxcpyx from upstream. This is upstream commit d5a89d7dc17a5ba5cf4fc71f82963c5c94a31c3d Note: there were also some very minor code cleanups to accelerometer.c: line 187 collect.c: lines 35, 140 libudev-device.c: line 780 libudev-hwdb.c: line 300 These are part of upstream commits: 507f22bd0172bff5e5d98145b1419bd472a2c57f 3cf7b686e6b29f78de0af5929602cae4482f6d49 67410e9f73a6cdd8453c78b966451b5151def14a Signed-off-by: Anthony G. Basile --- src/udev/udev-builtin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/udev/udev-builtin.c') diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c index 226295f686..22deaac1a8 100644 --- a/src/udev/udev-builtin.c +++ b/src/udev/udev-builtin.c @@ -109,12 +109,12 @@ enum udev_builtin_cmd udev_builtin_lookup(const char *command) enum udev_builtin_cmd i; char *pos; - util_strscpy(name, sizeof(name), command); + strscpy(name, sizeof(name), command); pos = strchr(name, ' '); if (pos) pos[0] = '\0'; for (i = 0; i < ELEMENTSOF(builtins); i++) - if (strcmp(builtins[i]->name, name) == 0) + if (streq(builtins[i]->name, name)) return i; return UDEV_BUILTIN_MAX; } @@ -127,7 +127,7 @@ int udev_builtin_run(struct udev_device *dev, enum udev_builtin_cmd cmd, const c /* we need '0' here to reset the internal state */ optind = 0; - util_strscpy(arg, sizeof(arg), command); + strscpy(arg, sizeof(arg), command); udev_build_argv(udev_device_get_udev(dev), arg, &argc, argv); return builtins[cmd]->cmd(dev, argc, argv, test); } -- cgit v1.2.3-54-g00ecf