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
82b53c65
Commit
82b53c65
authored
Mar 20, 2014
by
antirez
Browse files
struct dictEntry -> dictEntry.
parent
5317f5e9
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
82b53c65
...
...
@@ -685,7 +685,7 @@ void clusterDelNode(clusterNode *delnode) {
/* Node lookup by name */
clusterNode *clusterLookupNode(char *name) {
sds s = sdsnewlen(name, REDIS_CLUSTER_NAMELEN);
struct
dictEntry
*
de
;
dictEntry *de;
de = dictFind(server.cluster->nodes,s);
sdsfree(s);
...
...
@@ -1770,7 +1770,7 @@ void clusterSendPing(clusterLink *link, int type) {
/* Populate the gossip fields */
while(freshnodes > 0 && gossipcount < 3) {
struct
dictEntry
*
de
=
dictGetRandomKey
(
server
.
cluster
->
nodes
);
dictEntry *de = dictGetRandomKey(server.cluster->nodes);
clusterNode *this = dictGetVal(de);
clusterMsgDataGossip *gossip;
int j;
...
...
src/db.c
View file @
82b53c65
...
...
@@ -104,7 +104,7 @@ void dbAdd(redisDb *db, robj *key, robj *val) {
*
* The program is aborted if the key was not already present. */
void
dbOverwrite
(
redisDb
*
db
,
robj
*
key
,
robj
*
val
)
{
struct
dictEntry
*
de
=
dictFind
(
db
->
dict
,
key
->
ptr
);
dictEntry
*
de
=
dictFind
(
db
->
dict
,
key
->
ptr
);
redisAssertWithInfo
(
NULL
,
key
,
de
!=
NULL
);
dictReplace
(
db
->
dict
,
key
->
ptr
,
val
);
...
...
@@ -136,7 +136,7 @@ int dbExists(redisDb *db, robj *key) {
*
* The function makes sure to return keys not already expired. */
robj
*
dbRandomKey
(
redisDb
*
db
)
{
struct
dictEntry
*
de
;
dictEntry
*
de
;
while
(
1
)
{
sds
key
;
...
...
src/pubsub.c
View file @
82b53c65
...
...
@@ -50,7 +50,7 @@ int listMatchPubsubPattern(void *a, void *b) {
/* Subscribe a client to a channel. Returns 1 if the operation succeeded, or
* 0 if the client was already subscribed to that channel. */
int
pubsubSubscribeChannel
(
redisClient
*
c
,
robj
*
channel
)
{
struct
dictEntry
*
de
;
dictEntry
*
de
;
list
*
clients
=
NULL
;
int
retval
=
0
;
...
...
@@ -80,7 +80,7 @@ int pubsubSubscribeChannel(redisClient *c, robj *channel) {
/* Unsubscribe a client from a channel. Returns 1 if the operation succeeded, or
* 0 if the client was not subscribed to the specified channel. */
int
pubsubUnsubscribeChannel
(
redisClient
*
c
,
robj
*
channel
,
int
notify
)
{
struct
dictEntry
*
de
;
dictEntry
*
de
;
list
*
clients
;
listNode
*
ln
;
int
retval
=
0
;
...
...
@@ -218,7 +218,7 @@ int pubsubUnsubscribeAllPatterns(redisClient *c, int notify) {
/* Publish a message */
int
pubsubPublishMessage
(
robj
*
channel
,
robj
*
message
)
{
int
receivers
=
0
;
struct
dictEntry
*
de
;
dictEntry
*
de
;
listNode
*
ln
;
listIter
li
;
...
...
src/redis.c
View file @
82b53c65
...
...
@@ -688,7 +688,7 @@ void updateDictResizePolicy(void) {
*
* The parameter 'now' is the current time in milliseconds as is passed
* to the function to avoid too many gettimeofday() syscalls. */
int
activeExpireCycleTryExpire
(
redisDb
*
db
,
struct
dictEntry
*
de
,
long
long
now
)
{
int activeExpireCycleTryExpire(redisDb *db, dictEntry *de, long long now) {
long long t = dictGetSignedIntegerVal(de);
if (now > t) {
sds key = dictGetKey(de);
...
...
@@ -2852,7 +2852,7 @@ void evictionPoolPopulate(dict *sampledict, dict *keydict, struct evictionPoolEn
unsigned long long idle;
sds key;
robj *o;
struct
dictEntry
*
de
;
dictEntry *de;
de = dictGetRandomKey(sampledict);
key = dictGetKey(de);
...
...
@@ -2939,7 +2939,7 @@ int freeMemoryIfNeeded(void) {
for (j = 0; j < server.dbnum; j++) {
long bestval = 0; /* just to prevent warning */
sds bestkey = NULL;
struct
dictEntry
*
de
;
dictEntry *de;
redisDb *db = server.db+j;
dict *dict;
...
...
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