summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2004-01-22 00:54:52 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:17 -0700
commit267f534d1c809c31e0dcc9613953ecac45529038 (patch)
tree006bf6a04b73645d06400daf9aa3a5405e6e036b
parent069bd530124afe40453a5530b8bfa17b1b39989a (diff)
[PATCH] misc code cleanups.
-rw-r--r--logging.h2
-rw-r--r--namedev.c19
-rw-r--r--namedev_parse.c4
3 files changed, 11 insertions, 14 deletions
diff --git a/logging.h b/logging.h
index 2d09b9a088..df5922b3e6 100644
--- a/logging.h
+++ b/logging.h
@@ -34,7 +34,7 @@
#undef info
#define info(format, arg...) \
do { \
- log_message (LOG_INFO , format , ## arg); \
+ log_message (LOG_INFO , format , ## arg); \
} while (0)
#ifdef DEBUG
diff --git a/namedev.c b/namedev.c
index 7fd69f7778..e0d396e6ff 100644
--- a/namedev.c
+++ b/namedev.c
@@ -145,25 +145,25 @@ static mode_t get_default_mode(void)
{
mode_t mode = 0600; /* default to owner rw only */
- if (strlen(default_mode_str) != 0) {
+ if (strlen(default_mode_str) != 0)
mode = strtol(default_mode_str, NULL, 8);
- }
+
return mode;
}
-static char * get_default_owner(void)
+static char *get_default_owner(void)
{
- if (strlen(default_owner_str) == 0) {
+ if (strlen(default_owner_str) == 0)
strncpy(default_owner_str, "root", OWNER_SIZE);
- }
+
return default_owner_str;
}
-static char * get_default_group(void)
+static char *get_default_group(void)
{
- if (strlen(default_group_str) == 0) {
+ if (strlen(default_group_str) == 0)
strncpy(default_group_str, "root", GROUP_SIZE);
- }
+
return default_group_str;
}
@@ -563,10 +563,9 @@ device_found:
* if needed
*/
if (sysfs_device) {
-
if (sysfs_device->bus[0] != '\0')
goto bus_found;
-
+
loop = 10;
tspec.tv_nsec = 10000000;
while (loop--) {
diff --git a/namedev_parse.c b/namedev_parse.c
index 546d767aed..b15be0e6fa 100644
--- a/namedev_parse.c
+++ b/namedev_parse.c
@@ -120,7 +120,6 @@ void dump_perm_dev_list(void)
dump_perm_dev(dev);
}
-
int namedev_init_rules(void)
{
char line[255];
@@ -345,6 +344,5 @@ int namedev_init_permissions(void)
exit:
fclose(fd);
return retval;
-}
-
+}