repair return value incorrect

Signed-off-by: cat <chenjinxiang3@huawei.com>
This commit is contained in:
cat 2024-10-04 08:23:59 +00:00
parent fd6f876f7d
commit 2ea968ce5f

View File

@ -243,7 +243,7 @@ static int BatchSavePersistParam(PERSIST_SAVE_HANDLE handle[], const char *name,
PARAM_CHECK(ret > 0, return -1, "Batchsavepersistparam fail, error %d", errno);
}
}
return ret;
return (ret > 0) ? 0 : -1;
}
static void BatchSavePersistParamEnd(PERSIST_SAVE_HANDLE handle[])