1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

fix style violations

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Andrew Gregory 2013-02-13 18:54:28 -05:00 committed by Allan McRae
parent 578dfcd977
commit d5a5a6b512
3 changed files with 9 additions and 7 deletions

View File

@ -542,18 +542,19 @@ int SYMEXPORT alpm_pkg_load(alpm_handle_t *handle, const char *filename, int ful
alpm_siglevel_t level, alpm_pkg_t **pkg)
{
alpm_pkgvalidation_t validation = 0;
char *sigpath;
CHECK_HANDLE(handle, return -1);
ASSERT(pkg != NULL, RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1));
char *sigpath = _alpm_sigpath(handle, filename);
sigpath = _alpm_sigpath(handle, filename);
if(sigpath && !_alpm_access(handle, NULL, sigpath, R_OK)) {
if(level & ALPM_SIG_PACKAGE) {
alpm_list_t *keys = NULL;
int fail = 0;
unsigned char *sig = NULL;
int len = read_sigfile(sigpath, &sig);
if(len == -1) {
_alpm_log(handle, ALPM_LOG_ERROR,
_("failed to read signature file: %s\n"), sigpath);

View File

@ -382,7 +382,8 @@ gpg_error:
* @param fpr the fingerprint key ID to import
* @return 0 on success, -1 on error
*/
int _alpm_key_import(alpm_handle_t *handle, const char *fpr) {
int _alpm_key_import(alpm_handle_t *handle, const char *fpr)
{
int answer = 0, ret = -1;
alpm_pgpkey_t fetch_key;
memset(&fetch_key, 0, sizeof(fetch_key));

View File

@ -539,10 +539,11 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
for(i = deps; i; i = i->next) {
alpm_conflict_t *conflict = i->data;
int doremove = 0;
int found = 0;
/* if conflict->package2 (the local package) is not elected for removal,
we ask the user */
int found = 0;
for(j = trans->add; j && !found; j = j->next) {
alpm_pkg_t *spkg = j->data;
if(alpm_pkg_find(spkg->removes, conflict->package2)) {
@ -556,13 +557,12 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
_alpm_log(handle, ALPM_LOG_DEBUG, "package '%s' conflicts with '%s'\n",
conflict->package1, conflict->package2);
alpm_pkg_t *sync = alpm_pkg_find(trans->add, conflict->package1);
alpm_pkg_t *local = _alpm_db_get_pkgfromcache(handle->db_local, conflict->package2);
int doremove = 0;
QUESTION(handle, ALPM_QUESTION_CONFLICT_PKG, conflict->package1,
conflict->package2, conflict->reason->name, &doremove);
if(doremove) {
/* append to the removes list */
alpm_pkg_t *sync = alpm_pkg_find(trans->add, conflict->package1);
alpm_pkg_t *local = _alpm_db_get_pkgfromcache(handle->db_local, conflict->package2);
_alpm_log(handle, ALPM_LOG_DEBUG, "electing '%s' for removal\n", conflict->package2);
sync->removes = alpm_list_add(sync->removes, local);
} else { /* abort */