linenoise CHANGE clarify used types for storing read characters
diff --git a/tools/lint/linenoise/linenoise.c b/tools/lint/linenoise/linenoise.c
index eefbeb3..135a712 100644
--- a/tools/lint/linenoise/linenoise.c
+++ b/tools/lint/linenoise/linenoise.c
@@ -335,7 +335,7 @@
*
* The state of the editing is encapsulated into the pointed linenoiseState
* structure as described in the structure definition. */
-static int completeLine(struct linenoiseState *ls) {
+static char completeLine(struct linenoiseState *ls) {
linenoiseCompletions lc = {0, 0, NULL};
int nread, nwritten, hint_len, hint_line_count, char_count;
char c = 0, *common, *hint;
@@ -871,10 +871,11 @@
if (write(ls.ofd,prompt,ls.plen) == -1) return -1;
while(1) {
- int c = 0, nread;
+ char c = 0;
+ int nread;
char seq[3];
- nread = read(ls.ifd,&c,1);
+ nread = read(ls.ifd,&c,sizeof c);
if (nread <= 0) return ls.len;
/* Only autocomplete when the callback is set. It returns < 0 when