We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d72bef0 commit 50a3070Copy full SHA for 50a3070
src/sds.c
@@ -295,7 +295,7 @@ void sdsIncrLen(sds s, int incr) {
295
/* Grow the sds to have the specified length. Bytes that were not part of
296
* the original length of the sds will be set to zero. */
297
/*
298
- * 将 sds 的 buf 扩展至给定长度,无内容部分用 0 来填充
+ * 将 sds 的 buf 扩展至给定长度,无内容部分用 \0 来填充
299
*
300
* T = O(N)
301
*/
@@ -313,7 +313,7 @@ sds sdsgrowzero(sds s, size_t len) {
313
if (s == NULL) return NULL;
314
315
/* Make sure added region doesn't contain garbage */
316
- // 使用 0 来填充空位,确保空位中不包含垃圾数据
+ // 使用 \0 来填充空位,确保空位中不包含垃圾数据
317
sh = (void*)(s-(sizeof(struct sdshdr)));
318
memset(s+curlen,0,(len-curlen+1)); /* also set trailing \0 byte */
319
0 commit comments