From e13a3bf5990d03cca25c86efbfbaf2540d645413 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Thu, 3 Jan 2013 18:48:51 -0300 Subject: Fix missing spaces in operators Signed-off-by: Gerardo Exequiel Pozzi Signed-off-by: Allan McRae --- lib/libalpm/util.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/libalpm/util.c') diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index f6e66321..9effd181 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -69,22 +69,22 @@ 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) { - **str='\0'; + token = *str; + while(**str != '\0') { + if(strchr(delims, **str) != NULL) { + **str = '\0'; (*str)++; return token; } (*str)++; } /* There is no other token */ - *str=NULL; + *str = NULL; return token; } #endif @@ -350,7 +350,7 @@ int _alpm_unpack(alpm_handle_t *handle, const char *path, const char *prefix, char *entry_prefix = strdup(entryname); char *p = strstr(entry_prefix,"/"); if(p) { - *(p+1) = '\0'; + *(p + 1) = '\0'; } char *found = alpm_list_find_str(list, entry_prefix); free(entry_prefix); @@ -475,7 +475,7 @@ int _alpm_logaction(alpm_handle_t *handle, const char *fmt, va_list args) /* Use ISO-8601 date format */ fprintf(handle->logstream, "[%04d-%02d-%02d %02d:%02d] ", - tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, + tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min); ret = vfprintf(handle->logstream, fmt, args); fflush(handle->logstream); -- cgit v1.2.3-24-g4f1b