diff options
author | Denis Vlasenko | 2006-12-26 10:42:51 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-12-26 10:42:51 +0000 |
commit | bf0a201008671f81c107de72c026b1b84967561d (patch) | |
tree | af74820b70fa27929fe218c95822c20651b60637 /miscutils | |
parent | 5dd7ef0f37373e397a7160cb431a32ae57f9f7d9 (diff) | |
download | busybox-bf0a201008671f81c107de72c026b1b84967561d.zip busybox-bf0a201008671f81c107de72c026b1b84967561d.tar.gz |
style fixes
last xcalloc replaced by xzalloc
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 f39bb7e..5435a6a 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c @@ -457,7 +457,7 @@ int devfsd_main (int argc, char **argv) } /* strip last / from mount point, so we don't need to check for it later */ - while( argv[1][1]!='\0' && argv[1][strlen(argv[1])-1] == '/' ) + while (argv[1][1]!='\0' && argv[1][strlen(argv[1])-1] == '/' ) argv[1][strlen(argv[1]) -1] = '\0'; mount_point = argv[1]; @@ -557,7 +557,7 @@ static void read_config_file (char *path, int optional, unsigned long *event_mas if ( S_ISDIR (statbuf.st_mode) ) { /* strip last / from dirname so we don't need to check for it later */ - while( path && path[1]!='\0' && path[strlen(path)-1] == '/') + while (path && path[1]!='\0' && path[strlen(path)-1] == '/') path[strlen(path) -1] = '\0'; dir_operation(READ_CONFIG, path, 0, event_mask); @@ -665,7 +665,7 @@ static void process_config_line (const char *line, unsigned long *event_mask) i = index_in_str_array(options, what ); - switch(i) + switch (i) { case 4: /* "PERMISSIONS" */ new->action.what = AC_PERMISSIONS; @@ -1052,7 +1052,7 @@ static void action_compat (const struct devfsd_notify_struct *info, unsigned int if( i == 9 ) snprintf (compat_buf, sizeof (compat_buf), fmt[i], host, bus, target, lun, ptr + 2); /* esac */ - } /* switch(action) */ + } /* switch (action) */ if(compat_name == NULL ) return; @@ -1073,7 +1073,7 @@ static void action_compat (const struct devfsd_notify_struct *info, unsigned int debug_msg_logger(LOG_ERR, "unlink: %s: %m", compat_name); break; /*esac*/ - } /* switch(action) */ + } /* switch (action) */ } /* End Function action_compat */ static void restore(char *spath, struct stat source_stat, int rootlen) @@ -1265,7 +1265,7 @@ static mode_t get_mode (const char *string) mode = 0; i= S_IRUSR; - while(i>0) + while (i>0) { if(string[0]=='r'||string[0]=='w'||string[0]=='x') mode+=i; @@ -1381,7 +1381,7 @@ static void dir_operation(int type, const char * dir_name, int var, unsigned lon debug_msg_logger(LOG_ERR, "%s: %s: %m", __FUNCTION__, path); continue; } - switch(type) + switch (type) { case SERVICE: service(statbuf,path); @@ -1710,7 +1710,7 @@ static char get_old_ide_name (unsigned int major, unsigned int minor) c+=2; } i++; - } while(i<=IDE9_MAJOR); + } while (i<=IDE9_MAJOR); if (minor > 63) ++letter; diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 90c1639..16485b9 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c @@ -2043,10 +2043,10 @@ static void identify_from_stdin(void) // Convert the newline-separated hex data into an identify block. - for (i = 0; i<256; i++) - { + for (i = 0; i<256; i++) { int j; - for(j=0;j<4;j++) sbuf[i] = (sbuf[i] <<4) + fromhex(*(b++)); + for (j = 0; j < 4; j++) + sbuf[i] = (sbuf[i] <<4) + fromhex(*(b++)); } // Parse the data. diff --git a/miscutils/nmeter.c b/miscutils/nmeter.c index 0c94853..1fa35b2 100644 --- a/miscutils/nmeter.c +++ b/miscutils/nmeter.c @@ -594,7 +594,7 @@ static void collect_mem(mem_stat *s) } m_free += m_bufs + m_cached + m_slab; - switch(s->opt) { + switch (s->opt) { case 'f': scale(m_free << 10); break; default: |