ntdb: hand correct error code when alloc_read allocation fails.
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 22 Jun 2012 00:14:40 +0000 (09:44 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 22 Jun 2012 05:35:16 +0000 (07:35 +0200)
-ECUTNPASTE.  This is not a usage error!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/ntdb/io.c

index 11d5b1f3670ff28e04bd42c95f5a824da3fa38e1..a54f1a661c86d65be162a49a7e3e4950facc4603 100644 (file)
@@ -347,7 +347,7 @@ static void *_ntdb_alloc_read(struct ntdb_context *ntdb, ntdb_off_t offset,
        buf = ntdb->alloc_fn(ntdb, prefix + len ? prefix + len : 1,
                          ntdb->alloc_data);
        if (!buf) {
-               ntdb_logerr(ntdb, NTDB_ERR_OOM, NTDB_LOG_USE_ERROR,
+               ntdb_logerr(ntdb, NTDB_ERR_OOM, NTDB_LOG_ERROR,
                           "ntdb_alloc_read alloc failed len=%zu",
                           (size_t)(prefix + len));
                return NTDB_ERR_PTR(NTDB_ERR_OOM);