summaryrefslogtreecommitdiffstats
path: root/src/pacman/util.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-21 02:45:16 +0200
committerDan McGee <dan@archlinux.org>2011-04-21 02:47:39 +0200
commit4af6c72d790e13fd28abc0d7b2eaaece51fd7862 (patch)
tree1ac5a83657f77ee3a43d885c973c95f1ad3f31d2 /src/pacman/util.c
parent6760ec2b770e65f2aae9cfd39135cefd49961195 (diff)
downloadpacman-4af6c72d790e13fd28abc0d7b2eaaece51fd7862.tar.gz
pacman-4af6c72d790e13fd28abc0d7b2eaaece51fd7862.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'src/pacman/util.c')
-rw-r--r--src/pacman/util.c10
1 files changed, 5 insertions, 5 deletions
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';