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
e3c7f002
Commit
e3c7f002
authored
Mar 02, 2010
by
Damian Janowski & Michel Martens
Browse files
Remove trailing newline in interactive mode.
parent
6cf5882c
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis-cli.c
View file @
e3c7f002
...
@@ -439,7 +439,10 @@ static char *prompt(char *line, int size) {
...
@@ -439,7 +439,10 @@ static char *prompt(char *line, int size) {
retval
=
fgets
(
line
,
size
,
stdin
);
retval
=
fgets
(
line
,
size
,
stdin
);
}
while
(
retval
&&
*
line
==
'\n'
);
}
while
(
retval
&&
*
line
==
'\n'
);
line
[
strlen
(
line
)
-
1
]
=
'\0'
;
fpurge
(
stdin
);
fpurge
(
stdin
);
return
retval
;
return
retval
;
}
}
...
...
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