mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
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>
This commit is contained in:
parent
ff7ad5fd73
commit
c5761bfe41
@ -128,7 +128,7 @@ alpm_list_t SYMEXPORT *alpm_db_get_servers(const pmdb_t *db)
|
||||
/* Sanity checks */
|
||||
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, NULL));
|
||||
|
||||
return(db->servers);
|
||||
return db->servers;
|
||||
}
|
||||
|
||||
/** Set the serverlist of a database. */
|
||||
@ -222,7 +222,7 @@ int SYMEXPORT alpm_db_set_pgp_verify(pmdb_t *db, pgp_verify_t verify)
|
||||
_alpm_log(PM_LOG_DEBUG, "adding VerifySig option to database '%s': %d\n",
|
||||
db->treename, verify);
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Get the name of a package database. */
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user