diff options
author | Dan McGee <dan@archlinux.org> | 2011-04-02 13:51:25 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-04-04 19:03:27 -0500 |
commit | 6a8b1c4f8433e95e713e3c6f152ba717c90d1dc9 (patch) | |
tree | 28e581b8aaf7c5635a0ebda1d694f47f812f8ceb | |
parent | 38e5a4a54f1be3b678e5ab55b97f81be88824119 (diff) | |
download | pacman-6a8b1c4f8433e95e713e3c6f152ba717c90d1dc9.tar.xz |
Coding style cleanups
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | src/pacman/util.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c index c7d98540..3d268031 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -746,8 +746,9 @@ 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); int len = strlen(starts); if(len == 0) @@ -765,9 +766,9 @@ static int multiselect_parse(char *array, int count, char *response) if(len > 1) { /* check for range */ char *p; - if((p = strchr(starts+1, '-'))) { + if((p = strchr(starts + 1, '-'))) { *p = 0; - ends = p+1; + ends = p + 1; } } @@ -777,9 +778,11 @@ static int multiselect_parse(char *array, int count, char *response) if(!ends) { array[start-1] = include; } else { - if(parseindex(ends, &end, start, count) != 0) + int d; + if(parseindex(ends, &end, start, count) != 0) { return(-1); - for(int d = start; d <= end; d++) { + } + for(d = start; d <= end; d++) { array[d-1] = include; } } |