fix misleading indentation

Mostly to shut up the compiler, but some real bugs hidden in there.
This commit is contained in:
Patrick Georgi
2025-12-09 21:21:13 +01:00
parent dca08bc5c2
commit ae001c320f
26 changed files with 243 additions and 135 deletions

View File

@@ -637,10 +637,12 @@ int read_selection_file(FileSel *fsel, FILE *fp)
if (str_to_int(valp, &i) && i >= 0)
select_mode = i;
} else if (strncmp(lp + 1, STR_IMSNAME, 4) == 0) {
vp = valp; cut_field(valp);
vp = valp;
cut_field(valp);
RENEWSTR(imsname, vp);
} else if (strncmp(lp + 1, STR_HOSTNAME, 4) == 0) {
vp = valp; cut_field(valp);
vp = valp;
cut_field(valp);
FREE(hostname);
if (strcmp(vp, NAME_LOCAL))
hostname = NEWSTR(vp);

View File

@@ -223,9 +223,9 @@ void *_mp_;
#define is_white(c) ((c) == ' ' || (c) == '\t' || (c) == '\n')
#define skip_white(p) while (is_white(*(p))) (p)++
#define next_field(p) \
for ((p)++; *(p) && !is_white(*(p)); (p)++) ; skip_white(p)
do { for ((p)++; *(p) && !is_white(*(p)); (p)++) ; skip_white(p); } while (0)
#define cut_field(p) \
for ((p)++; *(p) && !is_white(*(p)); (p)++) ; *(p)++ = 0; skip_white(p)
do { for ((p)++; *(p) && !is_white(*(p)); (p)++) ; *(p)++ = 0; skip_white(p); } while (0)
/* misc */
#define Max(a, b) ((a) < (b) ? (b) : (a))