From bdc1508a068af7d9fb3d401922c0f2d8b012d8dc Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 20 Mar 2011 19:56:55 -0500 Subject: Fix assignment before NULL check Easy fix, found using null_ref.cocci example Coccinelle script. Signed-off-by: Dan McGee --- lib/libalpm/be_local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c index c3461b77..c13dffb4 100644 --- a/lib/libalpm/be_local.c +++ b/lib/libalpm/be_local.c @@ -995,10 +995,10 @@ pmdb_t *_alpm_db_register_local(void) _alpm_log(PM_LOG_DEBUG, "registering local database\n"); db = _alpm_db_new("local", 1); - db->ops = &local_db_ops; if(db == NULL) { RET_ERR(PM_ERR_DB_CREATE, NULL); } + db->ops = &local_db_ops; handle->db_local = db; return(db); -- cgit v1.2.3-70-g09d2 From 32e35d4028f30db5fc7cf96478015be293e4d123 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 20 Mar 2011 20:10:19 -0500 Subject: Fix comparison to 0 rather than NULL Another fix found by Coccinelle example semantic patches. Signed-off-by: Dan McGee --- lib/libalpm/package.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index d4b3b9c0..18d77d65 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -345,7 +345,7 @@ static void find_requiredby(pmpkg_t *pkg, pmdb_t *db, alpm_list_t **reqs) pmpkg_t *cachepkg = i->data; if(_alpm_dep_edge(cachepkg, pkg)) { const char *cachepkgname = cachepkg->name; - if(alpm_list_find_str(*reqs, cachepkgname) == 0) { + if(alpm_list_find_str(*reqs, cachepkgname) == NULL) { *reqs = alpm_list_add(*reqs, strdup(cachepkgname)); } } -- cgit v1.2.3-70-g09d2 From 451f9493f52975cad08ce9ff3b57c4d1993abfde Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 20 Mar 2011 23:08:22 -0500 Subject: Update source translation files in prep for 3.5.1 Signed-off-by: Dan McGee --- lib/libalpm/po/libalpm.pot | 8 ++++++-- po/pacman.pot | 21 ++++----------------- 2 files changed, 10 insertions(+), 19 deletions(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/po/libalpm.pot b/lib/libalpm/po/libalpm.pot index ba88318b..b4a5da66 100644 --- a/lib/libalpm/po/libalpm.pot +++ b/lib/libalpm/po/libalpm.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: pacman 3.5.0\n" "Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n" -"POT-Creation-Date: 2011-03-16 19:34-0500\n" +"POT-Creation-Date: 2011-03-20 12:35-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -188,7 +188,11 @@ msgid "could not determine mount point for file %s\n" msgstr "" #, c-format -msgid "could not determine filesystem mount points" +msgid "could not determine filesystem mount points\n" +msgstr "" + +#, c-format +msgid "could not determine root mount point %s\n" msgstr "" #, c-format diff --git a/po/pacman.pot b/po/pacman.pot index 9ab5d701..4fce2719 100644 --- a/po/pacman.pot +++ b/po/pacman.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: pacman 3.5.0\n" "Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n" -"POT-Creation-Date: 2011-03-14 13:57-0500\n" +"POT-Creation-Date: 2011-03-20 23:07-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -614,11 +614,8 @@ msgid "could not change directory to %s (%s)\n" msgstr "" #, c-format -msgid "directive '%s' without value not recognized\n" -msgstr "" - -#, c-format -msgid "directive '%s' with a value not recognized\n" +msgid "" +"config file %s, line %d: directive '%s' in section '%s' not recognized.\n" msgstr "" #, c-format @@ -652,17 +649,7 @@ msgid "config file %s, line %d: All directives must belong to a section.\n" msgstr "" #, c-format -msgid "config file %s, line %d: directive %s needs a value\n" -msgstr "" - -#, c-format -msgid "config file %s, line %d: problem in options section\n" -msgstr "" - -#, c-format -msgid "" -"config file %s, line %d: directive '%s' in repository section '%s' not " -"recognized.\n" +msgid "config file %s, line %d: directive '%s' needs a value\n" msgstr "" #, c-format -- cgit v1.2.3-70-g09d2