Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=cfpm.git;a=commitdiff;h=44370c6f377f273b3d31dbb0b2ad2c6cfe176cd7

commit 44370c6f377f273b3d31dbb0b2ad2c6cfe176cd7
Author: Priyank <priy...@frugalware.org>
Date:   Fri Jun 5 17:22:40 2009 +0530

minor fix in Database::readPackage()
* don't call setStatus() because pacman_db_readpkg() doesn't set
pm_errno on failure.

diff --git a/pm.cc b/pm.cc
index bfe50d7..546763b 100644
--- a/pm.cc
+++ b/pm.cc
@@ -120,14 +120,8 @@ Package* Database::readPackage(const string pname)
PM_PKG  *pkg = NULL;
Package *p = NULL;

-       if ( !(pkg=pacman_db_readpkg(db,pname.c_str())) )
-       {
-               setStatus();
-       }
-       else
-       {
+       if ( (pkg=pacman_db_readpkg(db,pname.c_str())) )
p = new Package(pkg);
-       }
return p;
}
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to