tweaks: correct a comment, and retype a variable

master
Benno Schulenberg 2019-10-26 11:18:38 +02:00
parent 2b9f06194f
commit fc716156a4
1 changed files with 4 additions and 5 deletions

View File

@ -2714,14 +2714,13 @@ void do_spell(void)
#endif /* ENABLE_SPELLER */ #endif /* ENABLE_SPELLER */
#ifdef ENABLE_COLOR #ifdef ENABLE_COLOR
/* Run a linting program on the current buffer. Return NULL for normal /* Run a linting program on the current buffer. */
* termination, and the error string otherwise. */
void do_linter(void) void do_linter(void)
{ {
char *lintings, *pointer, *onelint; char *lintings, *pointer, *onelint;
long pipesize; long pipesize;
size_t buffersize, bytesread, totalread; size_t buffersize, bytesread, totalread;
size_t parsesuccess = 0; bool parsesuccess = FALSE;
int lint_status, lint_fd[2]; int lint_status, lint_fd[2];
pid_t pid_lint; pid_t pid_lint;
bool helpless = ISSET(NO_HELP); bool helpless = ISSET(NO_HELP);
@ -2861,7 +2860,7 @@ void do_linter(void)
} }
/* Nice. We have a lint message we can use. */ /* Nice. We have a lint message we can use. */
parsesuccess++; parsesuccess = TRUE;
tmplint = curlint; tmplint = curlint;
curlint = nmalloc(sizeof(lintstruct)); curlint = nmalloc(sizeof(lintstruct));
curlint->next = NULL; curlint->next = NULL;
@ -2895,7 +2894,7 @@ void do_linter(void)
return; return;
} }
if (parsesuccess == 0) { if (!parsesuccess) {
statusline(HUSH, _("Got 0 parsable lines from command: %s"), statusline(HUSH, _("Got 0 parsable lines from command: %s"),
openfile->syntax->linter); openfile->syntax->linter);
return; return;