diff options
author | WuYunlong <xzsyeb@126.com> | 2020-09-23 14:09:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-23 09:09:48 +0300 |
commit | 63cd4d4e2044059c44a65e2ce424b9ce1fcdbd39 (patch) | |
tree | 5deeaeb935b56d690a0034ed7e33513c4a98ef8f /src/ziplist.c | |
parent | b96c3595af817721fc838746b859249bf9cf3aaf (diff) | |
download | redis-63cd4d4e2044059c44a65e2ce424b9ce1fcdbd39.tar.gz |
Fix redundancy use of semicolon in do-while macros in ziplist.c. (#7832)
this is very dangerous bug, but it looks like it didn't cause any harm.
Diffstat (limited to 'src/ziplist.c')
-rw-r--r-- | src/ziplist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ziplist.c b/src/ziplist.c index 6bfe34461..ac5cdafb9 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -390,7 +390,7 @@ unsigned int zipStoreEntryEncoding(unsigned char *p, unsigned char encoding, uns (lensize) = 1; \ (len) = zipIntSize(encoding); \ } \ -} while(0); +} while(0) /* Encode the length of the previous entry and write it to "p". This only * uses the larger encoding (required in __ziplistCascadeUpdate). */ @@ -426,7 +426,7 @@ unsigned int zipStorePrevEntryLength(unsigned char *p, unsigned int len) { } else { \ (prevlensize) = 5; \ } \ -} while(0); +} while(0) /* Return the length of the previous element, and the number of bytes that * are used in order to encode the previous element length. @@ -444,7 +444,7 @@ unsigned int zipStorePrevEntryLength(unsigned char *p, unsigned int len) { memcpy(&(prevlen), ((char*)(ptr)) + 1, 4); \ memrev32ifbe(&prevlen); \ } \ -} while(0); +} while(0) /* Given a pointer 'p' to the prevlen info that prefixes an entry, this * function returns the difference in number of bytes needed to encode |