1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-15 23:53:25 +00:00

Removed trailing white space from *.h and *.c files

This commit is contained in:
Gerhard Rieger 2023-06-12 23:01:54 +02:00
parent 920d77847d
commit 33896a3f38
38 changed files with 172 additions and 165 deletions

View file

@ -20,37 +20,37 @@ bool xioopts_ignoregroups;
#if WITH_NAMED
# define IF_NAMED(a,b) {a,b},
#else
# define IF_NAMED(a,b)
# define IF_NAMED(a,b)
#endif
#if WITH_PIPE || WITH_GOPEN
# define IF_OPEN(a,b) {a,b},
#else
# define IF_OPEN(a,b)
# define IF_OPEN(a,b)
#endif
#if WITH_TERMIOS
# define IF_TERMIOS(a,b) {a,b},
#else
# define IF_TERMIOS(a,b)
# define IF_TERMIOS(a,b)
#endif
#if WITH_EXEC
# define IF_EXEC(a,b) {a,b},
#else
# define IF_EXEC(a,b)
# define IF_EXEC(a,b)
#endif
#if _WITH_SOCKET
# define IF_SOCKET(a,b) {a,b},
#else
# define IF_SOCKET(a,b)
# define IF_SOCKET(a,b)
#endif
#if WITH_LISTEN
# define IF_LISTEN(a,b) {a,b},
#else
# define IF_LISTEN(a,b)
# define IF_LISTEN(a,b)
#endif
#if (WITH_UDP || WITH_TCP) && WITH_LISTEN
@ -62,49 +62,49 @@ bool xioopts_ignoregroups;
#if WITH_IP4 || WITH_IP6
# define IF_IP(a,b) {a,b},
#else
# define IF_IP(a,b)
# define IF_IP(a,b)
#endif
#if WITH_IP6
# define IF_IP6(a,b) {a,b},
#else
# define IF_IP6(a,b)
# define IF_IP6(a,b)
#endif
#if WITH_TCP|WITH_UDP
# define IF_IPAPP(a,b) {a,b},
#else
# define IF_IPAPP(a,b)
# define IF_IPAPP(a,b)
#endif
#if WITH_TCP
# define IF_TCP(a,b) {a,b},
#else
# define IF_TCP(a,b)
# define IF_TCP(a,b)
#endif
#if WITH_UDP
# define IF_UDP(a,b) {a,b},
#else
# define IF_UDP(a,b)
# define IF_UDP(a,b)
#endif
#if WITH_SCTP
# define IF_SCTP(a,b) {a,b},
#else
# define IF_SCTP(a,b)
# define IF_SCTP(a,b)
#endif
#if WITH_SOCKS4
# define IF_SOCKS4(a,b) {a,b},
#else
# define IF_SOCKS4(a,b)
# define IF_SOCKS4(a,b)
#endif
#if WITH_PROXY
# define IF_PROXY(a,b) {a,b},
#else
# define IF_PROXY(a,b)
# define IF_PROXY(a,b)
#endif
#if WITH_READLINE
@ -140,7 +140,7 @@ bool xioopts_ignoregroups;
#if WITH_RETRY
# define IF_RETRY(a,b) {a,b},
#else
# define IF_RETRY(a,b)
# define IF_RETRY(a,b)
#endif
@ -1003,7 +1003,7 @@ const struct optname optionnames[] = {
#ifdef O_NOFOLLOW
IF_OPEN ("nofollow", &opt_o_nofollow)
#endif
IF_EXEC ("nofork", &opt_nofork)
IF_EXEC ("nofork", &opt_nofork)
#ifdef O_NOINHERIT
IF_ANY ("noinherit", &opt_o_noinherit)
#endif
@ -1843,20 +1843,20 @@ const struct optname optionnames[] = {
} ;
/* walks the text argument a and writes its options that conform to groups
/* walks the text argument a and writes its options that conform to groups
to the array opts. Uses the option table 'optionnames'.
returns 0 on success, -1 on error, 1 on unknown/wrong option
returns 0 on success, -1 on error, 1 on unknown/wrong option
*/
int parseopts(const char **a, unsigned int groups, struct opt **opts) {
return parseopts_table(a, groups, opts, optionnames,
return parseopts_table(a, groups, opts, optionnames,
sizeof(optionnames)/sizeof(struct optname)-1);
}
/* walks the text argument a and writes its options that conform to groups
/* walks the text argument a and writes its options that conform to groups
to the array opts. Uses the specified option table.
returns 0 on success, -1 on error, 1 on unknown/wrong option
returns 0 on success, -1 on error, 1 on unknown/wrong option
*/
int parseopts_table(const char **a, unsigned int groups, struct opt **opts,
const struct optname optionnames[], size_t optionnum) {
@ -1956,7 +1956,7 @@ int parseopts_table(const char **a, unsigned int groups, struct opt **opts,
#endif
}
(*opts)[i].desc = ent->desc;
if (!strncmp(*a, assign_str, strlen(assign_str))) {
/* there is an assignment (mostly "=") */
(*a) += strlen(assign_str);
@ -2211,7 +2211,7 @@ int parseopts_table(const char **a, unsigned int groups, struct opt **opts,
#if LATER
case TYPE_INT3:
break;
#endif
@ -2525,7 +2525,7 @@ int parseopts_table(const char **a, unsigned int groups, struct opt **opts,
*buffp++ = '\0';
(*opts)[i].value.u_ip_mreq.param2 = strdup(buff); /*!!! NULL */
#if HAVE_STRUCT_IP_MREQN
#if HAVE_STRUCT_IP_MREQN
if (*tokp++ == ':') {
strncpy((*opts)[i].value.u_ip_mreq.ifindex, tokp, IF_NAMESIZE); /* ok */
Info4("setting option \"%s\" to {\"%s\",\"%s\",\"%s\"}",
@ -2605,7 +2605,7 @@ int parseopts_table(const char **a, unsigned int groups, struct opt **opts,
Error("!!!");
}
//(*opts)[i].value.u_bin.b_len
}
}
break;
#endif /* LATER */
@ -2758,7 +2758,7 @@ int showleft(const struct opt *opts) {
/* does not set GROUP_FD; cannot determine GROUP_TERMIOS ! */
int _groupbits(mode_t mode) {
unsigned int result = 0;
switch ((mode&S_IFMT)>>12) {
case (S_IFIFO>>12): /* 1, FIFO */
result = GROUP_FIFO; break;
@ -2851,8 +2851,8 @@ int retropt_timespec(struct opt *opts, int optcode, struct timespec *result) {
opt->desc = ODESC_DONE;
return 0;
}
/* Looks for the first option of type <optcode>. If the option is found,
this function stores its bool value in *result, "consumes" the
option, and returns 0.
@ -3135,7 +3135,7 @@ int retropt_bind(struct opt *opts,
!= STAT_OK) {
Error("error resolving bind option");
return STAT_NORETRY;
}
}
break;
#endif /* WITH_IP4 || WITH_IP6 */
@ -3485,7 +3485,7 @@ int applyopts(int fd, struct opt *opts, enum e_phase phase) {
opt->desc->type);
}
#endif /* _WITH_SOCKET */
#if HAVE_FLOCK
} else if (opt->desc->func == OFUNC_FLOCK) {
if (Flock(fd, opt->desc->major) < 0) {
@ -3537,7 +3537,7 @@ int applyopts(int fd, struct opt *opts, enum e_phase phase) {
opt->desc = ODESC_ERROR; ++opt; continue;
}
#endif /* HAVE_FTRUNCATE64 */
break;
break;
case OPT_F_SETLK_RD:
case OPT_F_SETLK_WR:
case OPT_F_SETLKW_RD:
@ -3554,7 +3554,7 @@ int applyopts(int fd, struct opt *opts, enum e_phase phase) {
opt->desc = ODESC_ERROR; ++opt; continue;
}
}
break;
break;
case OPT_SETUID_EARLY:
case OPT_SETUID:
if (Setuid(opt->value.u_uidt) < 0) {
@ -3666,7 +3666,7 @@ int applyopts(int fd, struct opt *opts, enum e_phase phase) {
} else {
if (Setsid() < 0) {
Error1("setsid(): %s", strerror(errno));
}
}
}
}
break;
@ -3807,7 +3807,7 @@ int applyopts_flags(struct opt *opts, int group, flags_t *result) {
if (!opts) return 0;
while (opt->desc != ODESC_END) {
if (opt->desc != ODESC_DONE &&
if (opt->desc != ODESC_DONE &&
(opt->desc->group & group)) {
if (opt->desc->func == OFUNC_FLAG) {
if (opt->value.u_bool) {
@ -3984,7 +3984,7 @@ int applyopts_single(struct single *xfd, struct opt *opts, enum e_phase phase) {
}
xfd->havelock = true;
break;
default:
/* just store the value in the correct component of struct single */
if (opt->desc->type == TYPE_CONST) {
@ -4069,7 +4069,7 @@ mc:addr
if (ifindex(opt->value.u_ip_mreq.ifindex,
(unsigned int *)&ip4_mreqn.mreqn.imr_ifindex, -1)
< 0) {
Error1("cannot resolve interface \"%s\"",
Error1("cannot resolve interface \"%s\"",
opt->value.u_ip_mreq.ifindex);
}
#endif /* HAVE_STRUCT_IP_MREQN */
@ -4095,7 +4095,7 @@ mc:addr
ip4_mreqn.mreq.imr_interface = sockaddr2.ip4.sin_addr;
}
}
#if LATER
if (0) {
; /* for canonical reasons */