From 4af6c72d790e13fd28abc0d7b2eaaece51fd7862 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 20 Apr 2011 19:45:16 -0500 Subject: syntax: if/while statements should have no trailing space This is the standard, and we have had a few of these introduced lately that should not be here. Done with: find -name '*.c' | xargs sed -i -e 's#if (#if(#g' find -name '*.c' | xargs sed -i -e 's#while (#while(#g' Signed-off-by: Dan McGee --- src/pacman/util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/pacman/util.c') diff --git a/src/pacman/util.c b/src/pacman/util.c index 098daf70..7fb2322d 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -589,7 +589,7 @@ void list_display(const char *title, const alpm_list_t *list) for (j = 1; j <= len; j++) { printf(" "); } - } else if (cols != len) { + } else if(cols != len) { /* 2 spaces are added if this is not the first element on a line. */ printf(" "); cols += 2; @@ -978,7 +978,7 @@ static int multiselect_parse(char *array, int count, char *response) char *ends = NULL; char *starts = strtok_r(str, " ", &saveptr); - if (starts == NULL) { + if(starts == NULL) { break; } strtrim(starts); @@ -986,7 +986,7 @@ static int multiselect_parse(char *array, int count, char *response) if(len == 0) continue; - if (*starts == '^') { + if(*starts == '^') { starts++; len--; include = 0; @@ -1145,7 +1145,7 @@ static int question(short preset, char *fmt, va_list args) if(strcasecmp(response, _("Y")) == 0 || strcasecmp(response, _("YES")) == 0) { return 1; - } else if (strcasecmp(response, _("N")) == 0 || strcasecmp(response, _("NO")) == 0) { + } else if(strcasecmp(response, _("N")) == 0 || strcasecmp(response, _("NO")) == 0) { return 0; } } @@ -1316,7 +1316,7 @@ char *strndup(const char *s, size_t n) size_t len = strnlen(s, n); char *new = (char *) malloc(len + 1); - if (new == NULL) + if(new == NULL) return NULL; new[len] = '\0'; -- cgit v1.2.3