diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-10-26 02:31:54 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-10-26 02:31:54 +0100 |
commit | 1822e9b033fcd91a7dfd3b0bfd12cfbbd93fc470 (patch) | |
tree | d9c37e4dc229d815686de1ae68f07bae63b605c3 /udev/udev-rules.c | |
parent | 21cfb0436c736c262baa37d96625041e3a96db07 (diff) |
do not init string arrays, just clear first byte
Diffstat (limited to 'udev/udev-rules.c')
-rw-r--r-- | udev/udev-rules.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/udev/udev-rules.c b/udev/udev-rules.c index 1647f5cb09..a6f9220352 100644 --- a/udev/udev-rules.c +++ b/udev/udev-rules.c @@ -547,11 +547,12 @@ static int wait_for_file(struct udev_device *dev, const char *file, int timeout) { struct udev *udev = udev_device_get_udev(dev); char filepath[UTIL_PATH_SIZE]; - char devicepath[UTIL_PATH_SIZE] = ""; + char devicepath[UTIL_PATH_SIZE]; struct stat stats; int loop = timeout * WAIT_LOOP_PER_SECOND; /* a relative path is a device attribute */ + devicepath[0] = '\0'; if (file[0] != '/') { util_strlcpy(devicepath, udev_get_sys_path(udev), sizeof(devicepath)); util_strlcat(devicepath, udev_device_get_devpath(dev), sizeof(devicepath)); |