Style fix: "if (" not "if(".

This commit is contained in:
Robin H. Johnson 2011-01-17 08:41:02 +00:00
parent 6804edfc85
commit b1fcf4ce9c
3 changed files with 9 additions and 9 deletions

View File

@ -201,16 +201,16 @@ file_regex(const char *file, const char *regex)
const char * const char *
rc_sys_v2(void) rc_sys_v2(void)
{ {
#define __STRING_SWITCH(x) { char* __string_switch = x; if(false) {} #define __STRING_SWITCH(x) { char* __string_switch = x; if (false) {}
#define __STRING_CASE(y) else if(strcmp(__string_switch,y) == 0) #define __STRING_CASE(y) else if (strcmp(__string_switch,y) == 0)
#define __STRING_SWITCH_END() } #define __STRING_SWITCH_END() }
char* systype = rc_conf_value("rc_sys"); char* systype = rc_conf_value("rc_sys");
/* New sys identification code */ /* New sys identification code */
if(systype) { if (systype) {
char* s = systype; char* s = systype;
// Convert to uppercase // Convert to uppercase
while(s && *s) { while(s && *s) {
if(islower((unsigned char)*s)) if (islower((unsigned char)*s))
*s = toupper((unsigned char)*s); *s = toupper((unsigned char)*s);
s++; s++;
} }
@ -290,7 +290,7 @@ librc_hidden_def(rc_sys_v1)
const char * const char *
rc_sys(void) rc_sys(void)
{ {
if(rc_conf_value("rc_sys")) { if (rc_conf_value("rc_sys")) {
return rc_sys_v2(); return rc_sys_v2();
} else { } else {
return rc_sys_v1(); return rc_sys_v1();

View File

@ -177,8 +177,8 @@ rc_depend(int argc, char **argv)
} }
} }
if(deptree_file) { if (deptree_file) {
if(!(deptree = rc_deptree_load_file(deptree_file))) if (!(deptree = rc_deptree_load_file(deptree_file)))
eerrorx("failed to load deptree"); eerrorx("failed to load deptree");
} else { } else {
if (!(deptree = _rc_deptree_load(update, NULL))) if (!(deptree = _rc_deptree_load(update, NULL)))

View File

@ -895,12 +895,12 @@ main(int argc, char **argv)
case 'S': case 'S':
if (rc_conf_value("rc_sys")) { if (rc_conf_value("rc_sys")) {
bootlevel = rc_sys_v2(); bootlevel = rc_sys_v2();
if(bootlevel) if (bootlevel)
printf("%s\n", bootlevel); printf("%s\n", bootlevel);
} else { } else {
ewarn("WARNING: rc_sys not defined in rc.conf. Falling back to automatic detection"); ewarn("WARNING: rc_sys not defined in rc.conf. Falling back to automatic detection");
bootlevel = rc_sys_v1(); bootlevel = rc_sys_v1();
if(bootlevel) if (bootlevel)
printf("%s\n", bootlevel); printf("%s\n", bootlevel);
} }
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);