File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ static inline char sdsReqType(size_t string_size) {
8787 * end of the string. However the string is binary safe and can contain
8888 * \0 characters in the middle, as the length is stored in the sds header. */
8989sds sdsnewlen (const void * init , size_t initlen ) {
90- void * sh ;
90+ void * newsh ;
9191 sds s ;
9292 char type = sdsReqType (initlen );
9393 /* Empty strings are usually created in order to append. Use type 8
@@ -96,13 +96,13 @@ sds sdsnewlen(const void *init, size_t initlen) {
9696 int hdrlen = sdsHdrSize (type );
9797 unsigned char * fp ; /* flags pointer. */
9898
99- sh = s_malloc (hdrlen + initlen + 1 );
100- if (sh == NULL ) return NULL ;
99+ newsh = s_malloc (hdrlen + initlen + 1 );
100+ if (newsh == NULL ) return NULL ;
101101 if (init == SDS_NOINIT )
102102 init = NULL ;
103103 else if (!init )
104- memset (sh , 0 , hdrlen + initlen + 1 );
105- s = (char * )sh + hdrlen ;
104+ memset (newsh , 0 , hdrlen + initlen + 1 );
105+ s = (char * )newsh + hdrlen ;
106106 fp = ((unsigned char * )s )- 1 ;
107107 switch (type ) {
108108 case SDS_TYPE_5 : {
You can’t perform that action at this time.
0 commit comments