diff options
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/devfsd.c | 16 | ||||
-rw-r--r-- | miscutils/hdparm.c | 6 | ||||
-rw-r--r-- | miscutils/nmeter.c | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index f39bb7e3f..5435a6a0b 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -457,7 +457,7 @@ int devfsd_main (int argc, char **argv) | |||
457 | } | 457 | } |
458 | 458 | ||
459 | /* strip last / from mount point, so we don't need to check for it later */ | 459 | /* strip last / from mount point, so we don't need to check for it later */ |
460 | while( argv[1][1]!='\0' && argv[1][strlen(argv[1])-1] == '/' ) | 460 | while (argv[1][1]!='\0' && argv[1][strlen(argv[1])-1] == '/' ) |
461 | argv[1][strlen(argv[1]) -1] = '\0'; | 461 | argv[1][strlen(argv[1]) -1] = '\0'; |
462 | 462 | ||
463 | mount_point = argv[1]; | 463 | mount_point = argv[1]; |
@@ -557,7 +557,7 @@ static void read_config_file (char *path, int optional, unsigned long *event_mas | |||
557 | if ( S_ISDIR (statbuf.st_mode) ) | 557 | if ( S_ISDIR (statbuf.st_mode) ) |
558 | { | 558 | { |
559 | /* strip last / from dirname so we don't need to check for it later */ | 559 | /* strip last / from dirname so we don't need to check for it later */ |
560 | while( path && path[1]!='\0' && path[strlen(path)-1] == '/') | 560 | while (path && path[1]!='\0' && path[strlen(path)-1] == '/') |
561 | path[strlen(path) -1] = '\0'; | 561 | path[strlen(path) -1] = '\0'; |
562 | 562 | ||
563 | dir_operation(READ_CONFIG, path, 0, event_mask); | 563 | dir_operation(READ_CONFIG, path, 0, event_mask); |
@@ -665,7 +665,7 @@ static void process_config_line (const char *line, unsigned long *event_mask) | |||
665 | 665 | ||
666 | i = index_in_str_array(options, what ); | 666 | i = index_in_str_array(options, what ); |
667 | 667 | ||
668 | switch(i) | 668 | switch (i) |
669 | { | 669 | { |
670 | case 4: /* "PERMISSIONS" */ | 670 | case 4: /* "PERMISSIONS" */ |
671 | new->action.what = AC_PERMISSIONS; | 671 | new->action.what = AC_PERMISSIONS; |
@@ -1052,7 +1052,7 @@ static void action_compat (const struct devfsd_notify_struct *info, unsigned int | |||
1052 | if( i == 9 ) | 1052 | if( i == 9 ) |
1053 | snprintf (compat_buf, sizeof (compat_buf), fmt[i], host, bus, target, lun, ptr + 2); | 1053 | snprintf (compat_buf, sizeof (compat_buf), fmt[i], host, bus, target, lun, ptr + 2); |
1054 | /* esac */ | 1054 | /* esac */ |
1055 | } /* switch(action) */ | 1055 | } /* switch (action) */ |
1056 | 1056 | ||
1057 | if(compat_name == NULL ) | 1057 | if(compat_name == NULL ) |
1058 | return; | 1058 | return; |
@@ -1073,7 +1073,7 @@ static void action_compat (const struct devfsd_notify_struct *info, unsigned int | |||
1073 | debug_msg_logger(LOG_ERR, "unlink: %s: %m", compat_name); | 1073 | debug_msg_logger(LOG_ERR, "unlink: %s: %m", compat_name); |
1074 | break; | 1074 | break; |
1075 | /*esac*/ | 1075 | /*esac*/ |
1076 | } /* switch(action) */ | 1076 | } /* switch (action) */ |
1077 | } /* End Function action_compat */ | 1077 | } /* End Function action_compat */ |
1078 | 1078 | ||
1079 | static void restore(char *spath, struct stat source_stat, int rootlen) | 1079 | static void restore(char *spath, struct stat source_stat, int rootlen) |
@@ -1265,7 +1265,7 @@ static mode_t get_mode (const char *string) | |||
1265 | 1265 | ||
1266 | mode = 0; | 1266 | mode = 0; |
1267 | i= S_IRUSR; | 1267 | i= S_IRUSR; |
1268 | while(i>0) | 1268 | while (i>0) |
1269 | { | 1269 | { |
1270 | if(string[0]=='r'||string[0]=='w'||string[0]=='x') | 1270 | if(string[0]=='r'||string[0]=='w'||string[0]=='x') |
1271 | mode+=i; | 1271 | mode+=i; |
@@ -1381,7 +1381,7 @@ static void dir_operation(int type, const char * dir_name, int var, unsigned lon | |||
1381 | debug_msg_logger(LOG_ERR, "%s: %s: %m", __FUNCTION__, path); | 1381 | debug_msg_logger(LOG_ERR, "%s: %s: %m", __FUNCTION__, path); |
1382 | continue; | 1382 | continue; |
1383 | } | 1383 | } |
1384 | switch(type) | 1384 | switch (type) |
1385 | { | 1385 | { |
1386 | case SERVICE: | 1386 | case SERVICE: |
1387 | service(statbuf,path); | 1387 | service(statbuf,path); |
@@ -1710,7 +1710,7 @@ static char get_old_ide_name (unsigned int major, unsigned int minor) | |||
1710 | c+=2; | 1710 | c+=2; |
1711 | } | 1711 | } |
1712 | i++; | 1712 | i++; |
1713 | } while(i<=IDE9_MAJOR); | 1713 | } while (i<=IDE9_MAJOR); |
1714 | 1714 | ||
1715 | if (minor > 63) | 1715 | if (minor > 63) |
1716 | ++letter; | 1716 | ++letter; |
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 90c163973..16485b900 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c | |||
@@ -2043,10 +2043,10 @@ static void identify_from_stdin(void) | |||
2043 | 2043 | ||
2044 | // Convert the newline-separated hex data into an identify block. | 2044 | // Convert the newline-separated hex data into an identify block. |
2045 | 2045 | ||
2046 | for (i = 0; i<256; i++) | 2046 | for (i = 0; i<256; i++) { |
2047 | { | ||
2048 | int j; | 2047 | int j; |
2049 | for(j=0;j<4;j++) sbuf[i] = (sbuf[i] <<4) + fromhex(*(b++)); | 2048 | for (j = 0; j < 4; j++) |
2049 | sbuf[i] = (sbuf[i] <<4) + fromhex(*(b++)); | ||
2050 | } | 2050 | } |
2051 | 2051 | ||
2052 | // Parse the data. | 2052 | // Parse the data. |
diff --git a/miscutils/nmeter.c b/miscutils/nmeter.c index 0c9485350..1fa35b293 100644 --- a/miscutils/nmeter.c +++ b/miscutils/nmeter.c | |||
@@ -594,7 +594,7 @@ static void collect_mem(mem_stat *s) | |||
594 | } | 594 | } |
595 | 595 | ||
596 | m_free += m_bufs + m_cached + m_slab; | 596 | m_free += m_bufs + m_cached + m_slab; |
597 | switch(s->opt) { | 597 | switch (s->opt) { |
598 | case 'f': | 598 | case 'f': |
599 | scale(m_free << 10); break; | 599 | scale(m_free << 10); break; |
600 | default: | 600 | default: |