[pacman-dev] [PATCH 2/4] Fix missing spaces in operators

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Thu Jan 3 16:48:51 EST 2013


Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar>
---
 lib/libalpm/filelist.c |  2 +-
 lib/libalpm/handle.c   |  2 +-
 lib/libalpm/util.c     | 16 ++++++++--------
 src/pacman/callback.c  |  2 +-
 src/pacman/conf.c      |  2 +-
 src/pacman/sync.c      |  4 ++--
 src/pacman/util.c      |  6 +++---
 7 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/lib/libalpm/filelist.c b/lib/libalpm/filelist.c
index d1aeb83..f4cdddc 100644
--- a/lib/libalpm/filelist.c
+++ b/lib/libalpm/filelist.c
@@ -185,7 +185,7 @@ error:
 int _alpm_filelist_resolve(alpm_handle_t *handle, alpm_filelist_t *files)
 {
 	char path[PATH_MAX];
-	size_t root_len, i=0;
+	size_t root_len, i = 0;
 	int ret = 0;
 
 	if(!files || files->resolved_path) {
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index c064379..75aaf9d 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -57,7 +57,7 @@ void _alpm_handle_free(alpm_handle_t *handle)
 	/* close logfile */
 	if(handle->logstream) {
 		fclose(handle->logstream);
-		handle->logstream= NULL;
+		handle->logstream = NULL;
 	}
 	if(handle->usesyslog) {
 		handle->usesyslog = 0;
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index c33e32a..22953ba 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);
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index c9008e0..78dcd63 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -201,7 +201,7 @@ void cb_event(alpm_event_t event, void *data1, void *data2)
 			         alpm_pkg_get_name(data1),
 			         alpm_pkg_get_version(data2),
 			         alpm_pkg_get_version(data1));
-			display_new_optdepends(data2,data1);
+			display_new_optdepends(data2, data1);
 			break;
 		case ALPM_EVENT_INTEGRITY_START:
 			if(config->noprogressbar) {
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index de29975..6ea7fe2 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -127,7 +127,7 @@ static int download_with_xfercommand(const char *url, const char *localpath,
 	int usepart = 0;
 	int cwdfd;
 	struct stat st;
-	char *parsedcmd,*tempcmd;
+	char *parsedcmd, *tempcmd;
 	char *destfile, *tempfile, *filename;
 
 	if(!config->xfercommand) {
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 09d7657..b25f7a5 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -359,7 +359,7 @@ static void print_installed(alpm_db_t *db_local, alpm_pkg_t *pkg)
 	alpm_pkg_t *lpkg = alpm_db_get_pkg(db_local, pkgname);
 	if(lpkg) {
 		const char *lpkgver = alpm_pkg_get_version(lpkg);
-		if(strcmp(lpkgver,pkgver) == 0) {
+		if(strcmp(lpkgver, pkgver) == 0) {
 			printf(" [%s]", _("installed"));
 		} else {
 			printf(" [%s: %s]", _("installed"), lpkgver);
@@ -573,7 +573,7 @@ static int sync_list(alpm_list_t *syncs, alpm_list_t *targets)
 
 			if(db == NULL) {
 				pm_printf(ALPM_LOG_ERROR,
-					_("repository \"%s\" was not found.\n"),repo);
+					_("repository \"%s\" was not found.\n"), repo);
 				alpm_list_free(ls);
 				return 1;
 			}
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 81eec67..5203490 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -1266,7 +1266,7 @@ void display_optdepends(alpm_pkg_t *pkg)
 static void display_repo_list(const char *dbname, alpm_list_t *list,
 		unsigned short cols)
 {
-	const char *prefix= "  ";
+	const char *prefix = "  ";
 
 	printf(":: ");
 	printf(_("Repository %s\n"), dbname);
@@ -1361,14 +1361,14 @@ static int multiselect_parse(char *array, int count, char *response)
 			return -1;
 
 		if(!ends) {
-			array[start-1] = include;
+			array[start - 1] = include;
 		} else {
 			int d;
 			if(parseindex(ends, &end, start, count) != 0) {
 				return -1;
 			}
 			for(d = start; d <= end; d++) {
-				array[d-1] = include;
+				array[d - 1] = include;
 			}
 		}
 	}
-- 
1.8.1



More information about the pacman-dev mailing list