summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-20 19:45:16 -0500
committerDan McGee <dan@archlinux.org>2011-04-20 19:47:39 -0500
commit4af6c72d790e13fd28abc0d7b2eaaece51fd7862 (patch)
tree1ac5a83657f77ee3a43d885c973c95f1ad3f31d2 /lib/libalpm/util.c
parent6760ec2b770e65f2aae9cfd39135cefd49961195 (diff)
downloadpacman-4af6c72d790e13fd28abc0d7b2eaaece51fd7862.tar.xz
syntax: if/while statements should have no trailing space
This is the standard, and we have had a few of these introduced lately that should not be here. Done with: find -name '*.c' | xargs sed -i -e 's#if (#if(#g' find -name '*.c' | xargs sed -i -e 's#while (#while(#g' Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 0a9dde2a..667e31e1 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -65,14 +65,14 @@ char* strsep(char** str, const char* delims)
{
char* token;
- if (*str==NULL) {
+ if(*str==NULL) {
/* No more tokens */
return NULL;
}
token=*str;
- while (**str!='\0') {
- if (strchr(delims,**str)!=NULL) {
+ while(**str!='\0') {
+ if(strchr(delims,**str)!=NULL) {
**str='\0';
(*str)++;
return token;
@@ -307,7 +307,7 @@ int _alpm_unpack(const char *archive, const char *prefix, alpm_list_t *list, int
char *found = alpm_list_find_str(list, prefix);
free(prefix);
if(!found) {
- if (archive_read_data_skip(_archive) != ARCHIVE_OK) {
+ if(archive_read_data_skip(_archive) != ARCHIVE_OK) {
ret = 1;
goto cleanup;
}
@@ -700,7 +700,7 @@ char SYMEXPORT *alpm_compute_md5sum(const char *filename)
/* defined above for OpenSSL, otherwise defined in md5.h */
ret = md5_file(filename, output);
- if (ret > 0) {
+ if(ret > 0) {
RET_ERR(PM_ERR_NOT_A_FILE, NULL);
}
@@ -838,7 +838,7 @@ int _alpm_splitname(const char *target, pmpkg_t *pkg)
end = target + strlen(target);
/* remove any trailing '/' */
- while (*(end - 1) == '/') {
+ while(*(end - 1) == '/') {
--end;
}
@@ -916,7 +916,7 @@ char *strndup(const char *s, size_t n)
size_t len = strnlen(s, n);
char *new = (char *) malloc(len + 1);
- if (new == NULL)
+ if(new == NULL)
return NULL;
new[len] = '\0';