- snprintf(filename, sizeof(filename), "%s%s/%s", sysfs_path, udev->dev->devpath, file);
- filename[sizeof(filename)-1] = '\0';
- dbg("wait %i sec for '%s'", timeout, filename);
+ strlcpy(devicepath, sysfs_path, sizeof(devicepath));
+ strlcat(devicepath, udev->dev->devpath, sizeof(devicepath));
+ strlcpy(filepath, devicepath, sizeof(filepath));
+ strlcat(filepath, "/", sizeof(filepath));
+ strlcat(filepath, file, sizeof(filepath));