Browse code

fix signedness problem (closes bug#122)

git-svn: trunk@2492

Tomasz Kojm authored on 2006/11/08 03:26:59
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Tue Nov  7 18:59:20 CET 2006 (tk)
2
+---------------------------------
3
+  * freshclam/manager.c: fix signedness problem (closes bug#122)
4
+
1 5
 Mon Nov  6 00:12:28 CET 2006 (tk)
2 6
 ---------------------------------
3 7
   * libclamav/scanners.c: fix some typos in debug messages, thanks to
... ...
@@ -771,7 +771,8 @@ int updatedb(const char *dbname, const char *hostname, char *ip, int *signo, con
771 771
 {
772 772
 	struct cl_cvd *current, *remote;
773 773
 	struct cfgstruct *cpt;
774
-	int nodb = 0, currver = 0, newver = -1, ret, port = 0, ims = -1, i;
774
+	unsigned int nodb = 0, currver = 0, newver = 0, port = 0, ims = 0, i;
775
+	int ret;
775 776
 	char *pt, dbfile[32], dbinc[32];
776 777
 	const char *proxy = NULL, *user = NULL, *pass = NULL, *uas = NULL;
777 778
 	unsigned int flevel = cl_retflevel(), inc;
... ...
@@ -858,7 +859,7 @@ int updatedb(const char *dbname, const char *hostname, char *ip, int *signo, con
858 858
     ctimeout = cfgopt(copt, "ConnectTimeout")->numarg;
859 859
     rtimeout = cfgopt(copt, "ReceiveTimeout")->numarg;
860 860
 
861
-    if(!nodb && newver == -1) {
861
+    if(!nodb && !newver) {
862 862
 
863 863
 	remote = remote_cvdhead(dbfile, hostname, ip, localip, proxy, port, user, pass, uas, &ims, ctimeout, rtimeout);
864 864