Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
23c64fe5
Commit
23c64fe5
authored
Aug 26, 2010
by
antirez
Browse files
translated a few long logn into int64_t for correctness and to avoid compilation warnings as well
parent
588cd980
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/aof.c
View file @
23c64fe5
...
@@ -468,7 +468,7 @@ int rewriteAppendOnlyFile(char *filename) {
...
@@ -468,7 +468,7 @@ int rewriteAppendOnlyFile(char *filename) {
/* Emit the SADDs needed to rebuild the set */
/* Emit the SADDs needed to rebuild the set */
if
(
o
->
encoding
==
REDIS_ENCODING_INTSET
)
{
if
(
o
->
encoding
==
REDIS_ENCODING_INTSET
)
{
int
ii
=
0
;
int
ii
=
0
;
long
long
llval
;
int64_t
llval
;
while
(
intsetGet
(
o
->
ptr
,
ii
++
,
&
llval
))
{
while
(
intsetGet
(
o
->
ptr
,
ii
++
,
&
llval
))
{
if
(
fwrite
(
cmd
,
sizeof
(
cmd
)
-
1
,
1
,
fp
)
==
0
)
goto
werr
;
if
(
fwrite
(
cmd
,
sizeof
(
cmd
)
-
1
,
1
,
fp
)
==
0
)
goto
werr
;
if
(
fwriteBulkObject
(
fp
,
&
key
)
==
0
)
goto
werr
;
if
(
fwriteBulkObject
(
fp
,
&
key
)
==
0
)
goto
werr
;
...
...
src/rdb.c
View file @
23c64fe5
...
@@ -273,7 +273,7 @@ int rdbSaveObject(FILE *fp, robj *o) {
...
@@ -273,7 +273,7 @@ int rdbSaveObject(FILE *fp, robj *o) {
dictReleaseIterator
(
di
);
dictReleaseIterator
(
di
);
}
else
if
(
o
->
encoding
==
REDIS_ENCODING_INTSET
)
{
}
else
if
(
o
->
encoding
==
REDIS_ENCODING_INTSET
)
{
intset
*
is
=
o
->
ptr
;
intset
*
is
=
o
->
ptr
;
long
long
llval
;
int64_t
llval
;
int
i
=
0
;
int
i
=
0
;
if
(
rdbSaveLen
(
fp
,
intsetLen
(
is
))
==
-
1
)
return
-
1
;
if
(
rdbSaveLen
(
fp
,
intsetLen
(
is
))
==
-
1
)
return
-
1
;
...
...
src/t_set.c
View file @
23c64fe5
...
@@ -112,7 +112,7 @@ robj *setTypeNext(setTypeIterator *si) {
...
@@ -112,7 +112,7 @@ robj *setTypeNext(setTypeIterator *si) {
incrRefCount
(
ret
);
incrRefCount
(
ret
);
}
}
}
else
if
(
si
->
encoding
==
REDIS_ENCODING_INTSET
)
{
}
else
if
(
si
->
encoding
==
REDIS_ENCODING_INTSET
)
{
long
long
llval
;
int64_t
llval
;
if
(
intsetGet
(
si
->
subject
->
ptr
,
si
->
ii
++
,
&
llval
))
if
(
intsetGet
(
si
->
subject
->
ptr
,
si
->
ii
++
,
&
llval
))
ret
=
createStringObjectFromLongLong
(
llval
);
ret
=
createStringObjectFromLongLong
(
llval
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment