From 1629e28f86c598bf8663c1a0ede81b68bc04a8c2 Mon Sep 17 00:00:00 2001 From: 0del <53461381+0del@users.noreply.github.com> Date: Thu, 4 Apr 2024 00:12:34 +0700 Subject: [PATCH] Rename redisError to serverError (#177) Part of #144 Signed-off-by: 0del --- src/server.c | 8 ++++---- src/server.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server.c b/src/server.c index 53c2b57a2..f2ecd3488 100644 --- a/src/server.c +++ b/src/server.c @@ -4246,11 +4246,11 @@ void incrementErrorCount(const char *fullerr, size_t namelen) { return; } - struct redisError *error = zmalloc(sizeof(*error)); + struct serverError *error = zmalloc(sizeof(*error)); error->count = 1; raxInsert(server.errors,(unsigned char*)fullerr,namelen,error,NULL); } else { - struct redisError *error = result; + struct serverError *error = result; error->count++; } } @@ -6071,10 +6071,10 @@ sds genRedisInfoString(dict *section_dict, int all_sections, int everything) { raxIterator ri; raxStart(&ri,server.errors); raxSeek(&ri,"^",NULL,0); - struct redisError *e; + struct serverError *e; while(raxNext(&ri)) { char *tmpsafe; - e = (struct redisError *) ri.data; + e = (struct serverError *) ri.data; info = sdscatprintf(info, "errorstat_%.*s:count=%lld\r\n", (int)ri.key_len, getSafeInfoString((char *) ri.key, ri.key_len, &tmpsafe), e->count); diff --git a/src/server.h b/src/server.h index 2b904309a..a5e6761be 100644 --- a/src/server.h +++ b/src/server.h @@ -2386,7 +2386,7 @@ struct serverCommand { struct RedisModuleCommand *module_cmd; /* A pointer to the module command data (NULL if native command) */ }; -struct redisError { +struct serverError { long long count; };