diff options
Diffstat (limited to 'udev.h')
-rw-r--r-- | udev.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -98,9 +98,9 @@ do { \ } while (0) #define foreach_strpart(str, separator, pos, len) \ - for(pos = 0, len = strcspn(str, separator); \ - (pos) < strlen(str); \ - pos = pos + (len) + 1, len = strcspn((str) + pos, separator)) \ + for(pos = str, len = 0; \ + (pos) < ((str) + strlen(str)); \ + pos = pos + len + strspn(pos, separator), len = strcspn(pos, separator)) \ if (len > 0) static inline char *get_action(void) |