summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/deps.c2
-rw-r--r--lib/libalpm/util.c26
-rw-r--r--src/pacman/callback.c4
-rw-r--r--src/pacman/conf.c8
-rw-r--r--src/pacman/pacman.c2
-rw-r--r--src/pacman/util.c6
6 files changed, 24 insertions, 24 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 89f6d691..9f7e9028 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -395,7 +395,7 @@ int _alpm_depcmp(alpm_pkg_t *pkg, alpm_depend_t *dep)
/* any version will satisfy the requirement */
satisfy = (provision->name_hash == dep->name_hash
&& strcmp(provision->name, dep->name) == 0);
- } else if (provision->mod == ALPM_DEP_MOD_EQ) {
+ } else if(provision->mod == ALPM_DEP_MOD_EQ) {
/* provision specifies a version, so try it out */
satisfy = (provision->name_hash == dep->name_hash
&& strcmp(provision->name, dep->name) == 0
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 96e1ef66..4eeb0cd7 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -942,7 +942,7 @@ char SYMEXPORT *alpm_compute_md5sum(const char *filename)
}
/* Convert the result to something readable */
- for (i = 0; i < 16; i++) {
+ for(i = 0; i < 16; i++) {
int pos = i * 2;
/* high 4 bits are first digit, low 4 are second */
md5sum[pos] = hex_digits[output[i] >> 4];
@@ -975,7 +975,7 @@ char SYMEXPORT *alpm_compute_sha256sum(const char *filename)
}
/* Convert the result to something readable */
- for (i = 0; i < 32; i++) {
+ for(i = 0; i < 32; i++) {
int pos = i * 2;
/* high 4 bits are first digit, low 4 are second */
sha256sum[pos] = hex_digits[output[i] >> 4];
@@ -1216,13 +1216,13 @@ off_t _alpm_strtoofft(const char *line)
return (off_t)-1;
}
result = strtoull(line, &end, 10);
- if (result == 0 && end == line) {
+ if(result == 0 && end == line) {
/* line was not a number */
return (off_t)-1;
- } else if (result == ULLONG_MAX && errno == ERANGE) {
+ } else if(result == ULLONG_MAX && errno == ERANGE) {
/* line does not fit in unsigned long long */
return (off_t)-1;
- } else if (*end) {
+ } else if(*end) {
/* line began with a number but has junk left over at the end */
return (off_t)-1;
}
@@ -1251,14 +1251,14 @@ alpm_time_t _alpm_parsedate(const char *line)
}
result = strtoll(line, &end, 10);
- if (result == 0 && end == line) {
+ if(result == 0 && end == line) {
/* line was not a number */
errno = EINVAL;
return 0;
- } else if (errno == ERANGE) {
+ } else if(errno == ERANGE) {
/* line does not fit in long long */
return 0;
- } else if (*end) {
+ } else if(*end) {
/* line began with a number but has junk left over at the end */
errno = EINVAL;
return 0;
@@ -1281,7 +1281,7 @@ int _alpm_access(alpm_handle_t *handle, const char *dir, const char *file, int a
size_t len = 0;
int ret = 0;
- if (dir) {
+ if(dir) {
char *check_path;
len = strlen(dir) + strlen(file) + 1;
@@ -1296,19 +1296,19 @@ int _alpm_access(alpm_handle_t *handle, const char *dir, const char *file, int a
}
if(ret != 0) {
- if (amode & R_OK) {
+ if(amode & R_OK) {
_alpm_log(handle, ALPM_LOG_DEBUG, "\"%s%s\" is not readable: %s\n",
dir, file, strerror(errno));
}
- if (amode & W_OK) {
+ if(amode & W_OK) {
_alpm_log(handle, ALPM_LOG_DEBUG, "\"%s%s\" is not writable: %s\n",
dir, file, strerror(errno));
}
- if (amode & X_OK) {
+ if(amode & X_OK) {
_alpm_log(handle, ALPM_LOG_DEBUG, "\"%s%s\" is not executable: %s\n",
dir, file, strerror(errno));
}
- if (amode == F_OK) {
+ if(amode == F_OK) {
_alpm_log(handle, ALPM_LOG_DEBUG, "\"%s%s\" does not exist: %s\n",
dir, file, strerror(errno));
}
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 2d989ba9..c118940d 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -298,7 +298,7 @@ void cb_question(alpm_question_t event, void *data1, void *data2,
alpm_list_t *unresolved = data1;
alpm_list_t *namelist = NULL, *i;
size_t count = 0;
- for (i = unresolved; i; i = i->next) {
+ for(i = unresolved; i; i = i->next) {
namelist = alpm_list_add(namelist,
(char *)alpm_pkg_get_name(i->data));
count++;
@@ -351,7 +351,7 @@ void cb_question(alpm_question_t event, void *data1, void *data2,
time_t time = (time_t)key->created;
strftime(created, 12, "%Y-%m-%d", localtime(&time));
- if (key->revoked) {
+ if(key->revoked) {
revoked = " (revoked)";
}
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 5328e7cc..482a86d9 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -259,11 +259,11 @@ static int process_siglevel(alpm_list_t *values, alpm_siglevel_t *storage,
const char *original = i->data, *value;
int package = 0, database = 0;
- if (strncmp(original, "Package", strlen("Package")) == 0) {
+ if(strncmp(original, "Package", strlen("Package")) == 0) {
/* only packages are affected, don't flip flags for databases */
value = original + strlen("Package");
package = 1;
- } else if (strncmp(original, "Database", strlen("Database")) == 0) {
+ } else if(strncmp(original, "Database", strlen("Database")) == 0) {
/* only databases are affected, don't flip flags for packages */
value = original + strlen("Database");
database = 1;
@@ -823,7 +823,7 @@ static int _parseconfig(const char *file, struct section_t *section,
if((ret = _parse_options(key, value, file, linenum)) != 0) {
goto cleanup;
}
- } else if (!parse_options && !section->is_options) {
+ } else if(!parse_options && !section->is_options) {
/* ... or in a repo section */
if(strcmp(key, "Server") == 0) {
if(value == NULL) {
@@ -860,7 +860,7 @@ static int _parseconfig(const char *file, struct section_t *section,
}
cleanup:
- if (fp) {
+ if(fp) {
fclose(fp);
}
pm_printf(ALPM_LOG_DEBUG, "config: finished parsing %s\n", file);
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index fa35e8de..d2fa62f8 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -207,7 +207,7 @@ static void usage(int op, const char * const myname)
addlist(_(" --noconfirm do not ask for any confirmation\n"));
}
list = alpm_list_msort(list, alpm_list_count(list), options_cmp);
- for (i = list; i; i = alpm_list_next(i)) {
+ for(i = list; i; i = alpm_list_next(i)) {
fputs((const char *)i->data, stdout);
}
alpm_list_free(list);
diff --git a/src/pacman/util.c b/src/pacman/util.c
index c0dcb9f2..12f3dcae 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -681,7 +681,7 @@ void list_display(const char *title, const alpm_list_t *list)
size_t j;
cols = len;
printf("\n");
- for (j = 1; j <= len; j++) {
+ for(j = 1; j <= len; j++) {
printf(" ");
}
} else if(cols != len) {
@@ -1184,7 +1184,7 @@ void select_display(const alpm_list_t *pkglist)
char *string = NULL;
const char *dbname = NULL;
- for (i = pkglist; i; i = i->next) {
+ for(i = pkglist; i; i = i->next) {
alpm_pkg_t *pkg = i->data;
alpm_db_t *db = alpm_pkg_get_db(pkg);
@@ -1227,7 +1227,7 @@ static int multiselect_parse(char *array, int count, char *response)
{
char *str, *saveptr;
- for (str = response; ; str = NULL) {
+ for(str = response; ; str = NULL) {
int include = 1;
int start, end;
char *ends = NULL;