]> mj.ucw.cz Git - libucw.git/commitdiff
oid's above OBUCK_OID_FIRST_SPECIAL are reserved for encoding of
authorMartin Mares <mj@ucw.cz>
Fri, 26 Jan 2001 16:28:09 +0000 (16:28 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 26 Jan 2001 16:28:09 +0000 (16:28 +0000)
error codes and other stuff.

lib/bucket.c
lib/bucket.h

index 6fec2a59eea69cb42766111d06e76a0136be2978..5799d6e5698d6c7a74176265e0ee4b7e8b716518 100644 (file)
@@ -175,6 +175,7 @@ obuck_find_by_oid(struct obuck_header *hdrp)
 {
   oid_t oid = hdrp->oid;
 
+  ASSERT(oid < OBUCK_OID_FIRST_SPECIAL);
   obuck_lock_read();
   obuck_get(oid);
   obuck_unlock();
index 7cc5d76c4932847217e364456f536a17d0a52ba3..f99baae92ffbc6068952363e99d324fb8a5f61c9 100644 (file)
@@ -24,6 +24,7 @@ extern byte *obuck_name;      /* Internal, for use by buckettool only! */
 #define OBUCK_INCOMPLETE_MAGIC 0xdeadfeel
 #define OBUCK_TRAILER 0xfeedcafe
 #define OBUCK_OID_DELETED (~(oid_t)0)
+#define OBUCK_OID_FIRST_SPECIAL (~(oid_t)0xffff)
 
 struct obuck_header {
   u32 magic;                   /* OBUCK_MAGIC should dwell here */