Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-13 17:43:09 -0500
committerDan McGee <dan@archlinux.org>2011-06-13 17:43:11 -0500
commitc5761bfe4121616a19f9a175d28731a60c3c7868 (patch)
treed7d3100caf13cee0ef4ed6f898139dcf7d45c237 /src
parentff7ad5fd7376c133bc646c4d69d06019e0b64044 (diff)
Fix all current return(x) usages
A few of these snuck in as of late, some from the table display patches that were using the previous format before we changed it after the 3.5.X major release. Noticed-by: Kerrick Staley <mail@kerrickstaley.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/query.c2
-rw-r--r--src/pacman/util.c18
2 files changed, 10 insertions, 10 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c
index cf24306c..c12aa91f 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -79,7 +79,7 @@ static int search_path(char **filename, struct stat *bufptr)
fullname = malloc(plen + flen + 2);
if(!fullname) {
free(envpath);
- return(-1);
+ return -1;
}
sprintf(fullname, "%s/%s", path, *filename);
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 043b9d6f..af422fe9 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -107,7 +107,7 @@ int needs_root(void)
static int flush_term_input(void) {
#ifdef HAVE_TCFLUSH
if(isatty(fileno(stdin))) {
- return(tcflush(fileno(stdin), TCIFLUSH));
+ return tcflush(fileno(stdin), TCIFLUSH);
}
#endif
@@ -517,10 +517,10 @@ static alpm_list_t *table_create_format(const alpm_list_t *header,
if(totalwidth > getcols(80)) {
fprintf(stderr, _("insufficient columns available for table display\n"));
FREELIST(formats);
- return(NULL);
+ return NULL;
}
- return(formats);
+ return formats;
}
/** Displays the list in table format
@@ -540,12 +540,12 @@ int table_display(const char *title, const alpm_list_t *header,
alpm_list_t *formats;
if(rows == NULL || header == NULL) {
- return(0);
+ return 0;
}
formats = table_create_format(header, rows);
if(formats == NULL) {
- return(-1);
+ return -1;
}
if(title != NULL) {
@@ -560,7 +560,7 @@ int table_display(const char *title, const alpm_list_t *header,
}
FREELIST(formats);
- return(0);
+ return 0;
}
void list_display(const char *title, const alpm_list_t *list)
@@ -645,7 +645,7 @@ static alpm_list_t *create_verbose_header(int install)
pm_asprintf(&str, "%s", _("Size"));
res = alpm_list_add(res, str);
- return(res);
+ return res;
}
/* returns package info as list of strings */
@@ -677,7 +677,7 @@ static alpm_list_t *create_verbose_row(pmpkg_t *pkg, int install)
pm_asprintf(&str, "%.2f %s", size, label);
ret = alpm_list_add(ret, str);
- return(ret);
+ return ret;
}
/* prepare a list of pkgs to display */
@@ -838,7 +838,7 @@ double humanize_size(off_t bytes, const char target_unit, int long_labels,
*label = labels[index];
}
- return(val);
+ return val;
}
void print_packages(const alpm_list_t *packages)