fix compiler warning
authorYang Tse <yangsita@gmail.com>
Fri, 26 Feb 2010 01:47:21 +0000 (01:47 +0000)
committerYang Tse <yangsita@gmail.com>
Fri, 26 Feb 2010 01:47:21 +0000 (01:47 +0000)
lib/cookie.c

index ca08d5f..cbf513d 100644 (file)
@@ -784,7 +784,7 @@ static int cookie_sort(const void *p1, const void *p2)
   size_t l1 = c1->path?strlen(c1->path):0;
   size_t l2 = c2->path?strlen(c2->path):0;
 
-  return (int)(l2 - l1);
+  return (l2 > l1) ? 1 : (l2 < l1) ? -1 : 0 ;
 }
 
 /*****************************************************************************