litn
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 14 Nov 1992 08:03:45 +0000 (00:03 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 14 Nov 1992 08:03:45 +0000 (00:03 -0800)
SCCS-vsn: lib/libc/db/btree/bt_get.c 5.5

usr/src/lib/libc/db/btree/bt_get.c

index ee7c268..261e1f5 100644 (file)
@@ -9,14 +9,16 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_get.c   5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)bt_get.c   5.5 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
-#include <errno.h>
+
 #include <db.h>
 #include <db.h>
-#include <stdio.h>
+#include <errno.h>
 #include <stddef.h>
 #include <stddef.h>
+#include <stdio.h>
+
 #include "btree.h"
 
 /*
 #include "btree.h"
 
 /*
@@ -111,8 +113,10 @@ __bt_first(t, key, exactp)
        if (ISSET(t, BTF_DELCRSR)) {
                cpgno = t->bt_bcursor.pgno;
                cindex = t->bt_bcursor.index;
        if (ISSET(t, BTF_DELCRSR)) {
                cpgno = t->bt_bcursor.pgno;
                cindex = t->bt_bcursor.index;
-       } else
+       } else {
                cpgno = P_INVALID;
                cpgno = P_INVALID;
+               cindex = 0;             /* GCC thinks it's uninitialized. */
+       }
 
        /*
         * Walk backwards, skipping empty pages, as long as the entry matches
 
        /*
         * Walk backwards, skipping empty pages, as long as the entry matches