mirror of
https://github.com/antirez/linenoise.git
synced 2026-02-04 04:41:38 +00:00
Fit coding style guidelines
This commit is contained in:
@@ -935,8 +935,11 @@ char *linenoiseEditFeed(struct linenoiseState *l) {
|
||||
char seq[3];
|
||||
|
||||
nread = read(l->ifd,&c,1);
|
||||
if (nread < 0) return ((EAGAIN == errno) || (EWOULDBLOCK == errno)) ? linenoiseEditMore : NULL;
|
||||
if (0 == nread) return NULL;
|
||||
if (nread < 0) {
|
||||
return (errno == EAGAIN || errno == EWOULDBLOCK) ? linenoiseEditMore : NULL;
|
||||
} else if (nread == 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Only autocomplete when the callback is set. It returns < 0 when
|
||||
* there was an error reading from fd. Otherwise it will return the
|
||||
|
||||
Reference in New Issue
Block a user