Added a few files to be ignored
[idzebra-moved-to-github.git] / index / rank1.c
index c79edea..029f5de 100644 (file)
@@ -1,6 +1,6 @@
-/* $Id: rank1.c,v 1.21 2004-11-29 21:55:25 adam Exp $
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
-   Index Data Aps
+/* $Id: rank1.c,v 1.24 2005-03-08 14:41:37 adam Exp $
+   Copyright (C) 1995-2005
+   Index Data ApS
 
 This file is part of the Zebra server.
 
@@ -56,9 +56,11 @@ struct rank_set_info {
     NMEM nmem;
 };
 
-static int log2_int (unsigned g)
+static int log2_int (zint g)
 {
     int n = 0;
+    if (g < 0)
+       return 0;
     while ((g = g>>1))
        n++;
     return n;