Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit50a3070

Browse files
committed
修复 sds.c 中的一个小 bug
1 parentd72bef0 commit50a3070

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/sds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ void sdsIncrLen(sds s, int incr) {
295295
/* Grow the sds to have the specified length. Bytes that were not part of
296296
* the original length of the sds will be set to zero. */
297297
/*
298-
* 将 sds 的 buf 扩展至给定长度,无内容部分用 0 来填充
298+
* 将 sds 的 buf 扩展至给定长度,无内容部分用\0 来填充
299299
*
300300
* T = O(N)
301301
*/
@@ -313,7 +313,7 @@ sds sdsgrowzero(sds s, size_t len) {
313313
if (s==NULL)returnNULL;
314314

315315
/* Make sure added region doesn't contain garbage */
316-
// 使用 0 来填充空位,确保空位中不包含垃圾数据
316+
// 使用\0 来填充空位,确保空位中不包含垃圾数据
317317
sh= (void*)(s-(sizeof(structsdshdr)));
318318
memset(s+curlen,0,(len-curlen+1));/* also set trailing \0 byte */
319319

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp