chiark / gitweb /
[PATCH] cleanup namedev_parse debug text
[elogind.git] / namedev_parse.c
index 449aa44..02ffb0a 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,13 +289,12 @@ 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;
                        break;
                case NUMBER:
-                       dbg_parse(TYPE_NUMBER "name='%s', bus='%s', id='%s', symlink='%s'",
+                       dbg_parse(TYPE_NUMBER " name='%s', bus='%s', id='%s', symlink='%s'",
                                  dev.name, dev.bus, dev.id, dev.symlink);
                        if ((*dev.name == '\0') ||
                            (*dev.bus == '\0') ||
@@ -303,7 +302,7 @@ keys:
                                goto error;
                        break;
                case TOPOLOGY:
-                       dbg_parse(TYPE_TOPOLOGY "name='%s', bus='%s', "
+                       dbg_parse(TYPE_TOPOLOGY " name='%s', bus='%s', "
                                  "place='%s', symlink='%s'",
                                  dev.name, dev.bus, dev.place, dev.symlink);
                        if ((*dev.name == '\0') ||
@@ -312,14 +311,14 @@ keys:
                                goto error;
                        break;
                case REPLACE:
-                       dbg_parse(TYPE_REPLACE "name='%s', kernel_name='%s', symlink='%s'",
+                       dbg_parse(TYPE_REPLACE " name='%s', kernel_name='%s', symlink='%s'",
                                  dev.name, dev.kernel_name, dev.symlink);
                        if ((*dev.name == '\0') ||
                            (*dev.kernel_name == '\0'))
                                goto error;
                        break;
                case CALLOUT:
-                       dbg_parse(TYPE_CALLOUT "name='%s', bus='%s', program='%s', "
+                       dbg_parse(TYPE_CALLOUT " name='%s', bus='%s', program='%s', "
                                  "id='%s', symlink='%s'",
                                  dev.name, dev.bus, dev.exec_program,
                                  dev.id, dev.symlink);
@@ -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 */