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
57337380
Commit
57337380
authored
Mar 13, 2012
by
antirez
Browse files
c->bufpos initialization moved for aesthetics.
parent
c3e7441d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
57337380
...
@@ -22,7 +22,6 @@ int listMatchObjects(void *a, void *b) {
...
@@ -22,7 +22,6 @@ int listMatchObjects(void *a, void *b) {
redisClient
*
createClient
(
int
fd
)
{
redisClient
*
createClient
(
int
fd
)
{
redisClient
*
c
=
zmalloc
(
sizeof
(
redisClient
));
redisClient
*
c
=
zmalloc
(
sizeof
(
redisClient
));
c
->
bufpos
=
0
;
/* passing -1 as fd it is possible to create a non connected client.
/* passing -1 as fd it is possible to create a non connected client.
* This is useful since all the Redis commands needs to be executed
* This is useful since all the Redis commands needs to be executed
...
@@ -42,6 +41,7 @@ redisClient *createClient(int fd) {
...
@@ -42,6 +41,7 @@ redisClient *createClient(int fd) {
selectDb
(
c
,
0
);
selectDb
(
c
,
0
);
c
->
fd
=
fd
;
c
->
fd
=
fd
;
c
->
bufpos
=
0
;
c
->
querybuf
=
sdsempty
();
c
->
querybuf
=
sdsempty
();
c
->
reqtype
=
0
;
c
->
reqtype
=
0
;
c
->
argc
=
0
;
c
->
argc
=
0
;
...
...
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