Kouhei Sutou
kou****@cozmi*****
2008年 7月 4日 (金) 10:17:36 JST
須藤です。
sen_hash_open()のSEN_HASH_TINYのチェックが逆な気がします。
Index: lib/hash.c
===================================================================
--- lib/hash.c (revision 902)
+++ lib/hash.c (working copy)
@@ -393,6 +393,8 @@
sen_hash *hash = SEN_MALLOC(sizeof(sen_hash));
if (hash) {
if (header->flags & SEN_HASH_TINY) {
+ SEN_LOG(sen_log_notice, "invalid hash flag. (%x)", header->flags);
+ } else {
hash->flags = header->flags;
hash->ctx = ctx;
hash->key_size = header->key_size;
@@ -406,8 +408,6 @@
hash->header = header;
hash->lock = &header->lock;
return (sen_hash *)hash;
- } else {
- SEN_LOG(sen_log_notice, "invalid hash flag. (%x)", header->flags);
}
SEN_FREE(hash);
}