From 211809be141bf09ea9ad8b838ccec84283d1ab53 Mon Sep 17 00:00:00 2001 From: Attila Kovacs Date: Sun, 8 Dec 2024 11:19:58 +0100 Subject: [PATCH] Fix use of resp_type enum --- include/redisx.h | 4 ++-- src/resp.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/redisx.h b/include/redisx.h index 83fb617..e956713 100644 --- a/include/redisx.h +++ b/include/redisx.h @@ -384,8 +384,8 @@ int redisxLoadScript(Redis *redis, const char *script, char **sha1); int redisxGetTime(Redis *redis, struct timespec *t); RESP *redisxCopyOfRESP(const RESP *resp); -int redisxCheckRESP(const RESP *resp, char expectedType, int expectedSize); -int redisxCheckDestroyRESP(RESP *resp, char expectedType, int expectedSize); +int redisxCheckRESP(const RESP *resp, enum resp_type expectedType, int expectedSize); +int redisxCheckDestroyRESP(RESP *resp, enum resp_type, int expectedSize); void redisxDestroyRESP(RESP *resp); boolean redisxIsScalarType(const RESP *r); boolean redisxIsStringType(const RESP *r); diff --git a/src/resp.c b/src/resp.c index baeccad..5299da6 100644 --- a/src/resp.c +++ b/src/resp.c @@ -147,7 +147,7 @@ RESP *redisxCopyOfRESP(const RESP *resp) { * or the error returned in resp->n. * */ -int redisxCheckRESP(const RESP *resp, char expectedType, int expectedSize) { +int redisxCheckRESP(const RESP *resp, enum resp_type expectedType, int expectedSize) { static const char *fn = "redisxCheckRESP"; if(resp == NULL) return x_error(X_NULL, EINVAL, fn, "RESP is NULL"); @@ -174,7 +174,7 @@ int redisxCheckRESP(const RESP *resp, char expectedType, int expectedSize) { * \sa redisxCheckRESP() * */ -int redisxCheckDestroyRESP(RESP *resp, char expectedType, int expectedSize) { +int redisxCheckDestroyRESP(RESP *resp, enum resp_type expectedType, int expectedSize) { int status = redisxCheckRESP(resp, expectedType, expectedSize); if(status) redisxDestroyRESP(resp); prop_error("redisxCheckDestroyRESP", status);