chiark / gitweb /
[PATCH] fix for apply_format()
[elogind.git] / namedev_parse.c
index 449aa44eaaeb53da2c55229ed106c17afa0b283c..2858a2809103ed31cbe6b6e66f896dd3c30d89f9 100644 (file)
@@ -176,7 +176,7 @@ int namedev_init_rules(void)
                        ++temp;
 
                /* empty line? */
-               if ((*temp == 0x00) || (*temp == 0x0a))
+               if ((*temp == '\0') || (*temp == '\n'))
                        continue;
 
                /* see if this is a comment */
@@ -289,7 +289,6 @@ keys:
                                  dev.name, dev.bus, dev.sysfs_pair[0].file,
                                  dev.sysfs_pair[0].value, dev.symlink);
                        if ((*dev.name == '\0') ||
-                           (*dev.bus == '\0') ||
                            (*dev.sysfs_pair[0].file == '\0') ||
                            (*dev.sysfs_pair[0].value == '\0'))
                                goto error;
@@ -377,7 +376,7 @@ int namedev_init_permissions(void)
                        ++temp;
 
                /* empty line? */
-               if ((*temp == 0x00) || (*temp == 0x0a))
+               if ((*temp == '\0') || (*temp == '\n'))
                        continue;
 
                /* see if this is a comment */