log_message(LOG_INFO ,"%s: " format ,__FUNCTION__ ,## arg); \
} while (0)
-#ifdef DEBUG
+#ifdef UDEV_DEBUG
#undef dbg
#define dbg(format, arg...) \
do { \
strlcpy(link_path, "/sys", sizeof(link_path));
strlcat(link_path, devpath, sizeof(link_path));
- len = readlink(link_path, link_target, sizeof(link_target));
+ len = readlink(link_path, link_target, sizeof(link_target) - 1);
if (len <= 0)
return -1;
link_target[len] = '\0';