summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSun He <sunheehnus@gmail.com>2014-11-02 10:40:28 +0800
committerantirez <antirez@gmail.com>2014-12-09 15:14:09 +0100
commit3959fa2c02b077237e6e709e1e44f583a3e0335d (patch)
tree28b58126af4f497dbd41b18a0907b39df43a93c7
parent24ae9a4a82cd17682523e6540336b9cd38827b4b (diff)
downloadredis-3959fa2c02b077237e6e709e1e44f583a3e0335d.tar.gz
sds.c: Correct some comments
-rw-r--r--src/sds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sds.c b/src/sds.c
index 0ad925b4a..36ae56c99 100644
--- a/src/sds.c
+++ b/src/sds.c
@@ -295,7 +295,7 @@ sds sdscpy(sds s, const char *t) {
* conversion. 's' must point to a string with room for at least
* SDS_LLSTR_SIZE bytes.
*
- * The function returns the lenght of the null-terminated string
+ * The function returns the lengh of the null-terminated string
* representation stored at 's'. */
#define SDS_LLSTR_SIZE 21
int sdsll2str(char *s, long long value) {
@@ -415,7 +415,7 @@ sds sdscatvprintf(sds s, const char *fmt, va_list ap) {
*
* Example:
*
- * s = sdsempty("Sum is: ");
+ * s = sdsnew("Sum is: ");
* s = sdscatprintf(s,"%d+%d = %d",a,b,a+b).
*
* Often you need to create a string from scratch with the printf-alike
@@ -643,8 +643,8 @@ void sdstoupper(sds s) {
*
* Return value:
*
- * 1 if s1 > s2.
- * -1 if s1 < s2.
+ * positive if s1 > s2.
+ * negative if s1 < s2.
* 0 if s1 and s2 are exactly the same binary string.
*
* If two strings share exactly the same prefix, but one of the two has