mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
[PATCH] misc code cleanups.
This commit is contained in:
parent
069bd53012
commit
267f534d1c
@ -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
|
||||
|
19
namedev.c
19
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--) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user