diff --git a/src/networking.c b/src/networking.c index df824e78b..6e0e1625a 100644 --- a/src/networking.c +++ b/src/networking.c @@ -61,7 +61,7 @@ redisClient *createClient(int fd) { * contexts (for instance a Lua script) we need a non connected client. */ // 因为 Redis 命令总在客户端的上下文中执行, // 有时候为了在服务器内部执行命令,需要使用伪客户端来执行命令 - // 在 fd == 1 时,创建的客户端为伪终端 + // 在 fd == -1 时,创建的客户端为伪终端 if (fd != -1) { anetNonBlock(NULL,fd); anetTcpNoDelay(NULL,fd); diff --git a/src/sds.c b/src/sds.c index 1c527d59e..4426b59b2 100644 --- a/src/sds.c +++ b/src/sds.c @@ -104,8 +104,9 @@ sds sdsdup(const sds s) { } /* - * 释放 sds 所对应的 sdshdr 结构的内存 - * 给定 sds 必须为 NULL + * 释放 sds 所对应的 sdshdr 结构的内存。 + * + * 如果 s 为 NULL ,那么不做动作。 * * T = O(N) */