chiark / gitweb /
[PATCH] PATCH selinux for udev
[elogind.git] / libsysfs / sysfs / libsysfs.h
index cbde2f5783bb52cbe36ee5c28552a5d289c24a47..11cffae0456f372908c7af4366f1f7215c2a745f 100644 (file)
 #define safestrcpy(to, from)   strncpy(to, from, sizeof(to)-1)
 #define safestrcat(to, from)   strncat(to, from, sizeof(to) - strlen(to)-1)
 
-#define safestrncpy(to, from, maxsize) \
+#define safestrcpymax(to, from, max) \
 do { \
-       to[maxsize-1] = '\0'; \
-       strncpy(to, from, maxsize-1); \
+       to[max-1] = '\0'; \
+       strncpy(to, from, max-1); \
 } while (0)
 
-#define safestrncat(to, from, maxsize) \
+#define safestrcatmax(to, from, max) \
 do { \
-       to[maxsize-1] = '\0'; \
-       strncat(to, from, maxsize - strlen(to)-1); \
+       to[max-1] = '\0'; \
+       strncat(to, from, max - strlen(to)-1); \
 } while (0)
 
 /*