]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/usetable.c
Calls to cdb_fetch()/cdb_next_item() now check ptr for NULL or non-NULL
[citadel.git] / citadel / server / usetable.c
index 6364a8fa0bf6b7b3917d79cf8bb59ff997c0a93a..7095f53ed8d8491075db64ffb317a488249f46d1 100644 (file)
@@ -26,7 +26,7 @@ int CheckIfAlreadySeen(StrBuf *guid) {
 
        syslog(LOG_DEBUG, "usetable: CheckIfAlreadySeen(0x%8x)", hash);
        cdbut = cdb_fetch(CDB_USETABLE, &hash, sizeof(hash));
-       if (cdbut.len > 0) {
+       if (cdbut.ptr != NULL) {
                found = 1;
        }
 
@@ -34,5 +34,5 @@ int CheckIfAlreadySeen(StrBuf *guid) {
        ut.hash = hash;
        ut.timestamp = time(NULL);
        cdb_store(CDB_USETABLE, &hash, sizeof(hash), &ut, sizeof(struct UseTable));
-       return (found);
+       return(found);
 }