TXT_DB_write: fix the return check
authorPeiwei Hu <jlu.hpw@foxmail.com>
Sun, 14 Nov 2021 14:56:24 +0000 (22:56 +0800)
committerTomas Mraz <tomas@openssl.org>
Mon, 22 Nov 2021 13:43:44 +0000 (14:43 +0100)
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17028)

test/sslapitest.c

index 00f27cb78e911c283d4d84d374f980ab6a4d9806..29c125004aa7787833b91c89fb72b55e729670fa 100644 (file)
@@ -6802,7 +6802,7 @@ static int create_new_vfile(char *userid, char *password, const char *filename)
 
     row = NULL;
 
-    if (!TXT_DB_write(out, db))
+    if (TXT_DB_write(out, db) <= 0)
         goto end;
 
     ret = 1;