refactor: follow style guide

- reduce variable scope
- prefer initialization over declaration and assignment
- use bool to represent boolean values
This commit is contained in:
dundargoc
2023-11-12 15:54:54 +01:00
committed by dundargoc
parent 48bcc7b971
commit 28f4f3c484
42 changed files with 287 additions and 554 deletions

View File

@@ -2583,10 +2583,8 @@ char *getsourceline(int c, void *cookie, int indent, bool do_concat)
}
if (line != NULL && sp->conv.vc_type != CONV_NONE) {
char *s;
// Convert the encoding of the script line.
s = string_convert(&sp->conv, line, NULL);
char *s = string_convert(&sp->conv, line, NULL);
if (s != NULL) {
xfree(line);
line = s;