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
43ebb7ee
Commit
43ebb7ee
authored
Oct 16, 2018
by
hujiecs
Committed by
antirez
Oct 22, 2018
Browse files
several typos fixed, optimize MSETNX to avoid unnecessary loop
parent
de8fdaac
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/atomicvar.h
View file @
43ebb7ee
/* This file implements atomic counters using __atomic or __sync macros if
* available, otherwise synchronizing different threads using a mutex.
*
* The exported inter
a
face is composed of three macros:
* The exported interface is composed of three macros:
*
* atomicIncr(var,count) -- Increment the atomic counter
* atomicGetIncr(var,oldvalue_var,count) -- Get and increment the atomic counter
...
...
src/intset.c
View file @
43ebb7ee
...
...
@@ -123,7 +123,7 @@ static uint8_t intsetSearch(intset *is, int64_t value, uint32_t *pos) {
}
else
{
/* Check for the case where we know we cannot find the value,
* but do know the insert position. */
if
(
value
>
_intsetGet
(
is
,
intrev32ifbe
(
is
->
length
)
-
1
))
{
if
(
value
>
_intsetGet
(
is
,
max
))
{
if
(
pos
)
*
pos
=
intrev32ifbe
(
is
->
length
);
return
0
;
}
else
if
(
value
<
_intsetGet
(
is
,
0
))
{
...
...
src/object.c
View file @
43ebb7ee
...
...
@@ -185,7 +185,7 @@ robj *createStringObjectFromLongDouble(long double value, int humanfriendly) {
/* Duplicate a string object, with the guarantee that the returned object
* has the same encoding as the original one.
*
* This function also guarantees that duplicating a small integer
e
object
* This function also guarantees that duplicating a small integer object
* (or a string object that contains a representation of a small integer)
* will always result in a fresh object that is unshared (refcount == 1).
*
...
...
src/quicklist.h
View file @
43ebb7ee
...
...
@@ -40,7 +40,7 @@
* container: 2 bits, NONE=1, ZIPLIST=2.
* recompress: 1 bit, bool, true if node is temporarry decompressed for usage.
* attempted_compress: 1 bit, boolean, used for verifying during testing.
* extra: 1
2
bits, free for future use; pads out the remainder of 32 bits */
* extra: 1
0
bits, free for future use; pads out the remainder of 32 bits */
typedef
struct
quicklistNode
{
struct
quicklistNode
*
prev
;
struct
quicklistNode
*
next
;
...
...
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