From 4b3d6e29622f5934a0b78728b52e254c6be9c336 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Sun, 31 Jan 2021 13:45:00 +0100 Subject: [PATCH] Formatting: Use tabs for indents --- src/iodine.c | 2 +- src/iodined.c | 8 ++++---- src/md5.c | 44 ++++++++++++++++++++++---------------------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/iodine.c b/src/iodine.c index 78f0cab..0399334 100644 --- a/src/iodine.c +++ b/src/iodine.c @@ -71,7 +71,7 @@ static inline void help(FILE * stream, bool verbose) __attribute__((noreturn)); static void help(FILE *stream, bool verbose) { fprintf(stream, "iodine IP over DNS tunneling client\n\n" - "Usage: %s [-46fhrv] [-u user] [-t chrootdir] [-d device] [-P password]\n" + "Usage: %s [-46fhrv] [-u user] [-t chrootdir] [-d device] [-P password]\n" " [-m maxfragsize] [-M maxlen] [-T type] [-O enc] [-L 0|1] [-I sec]\n" " [-z context] [-F pidfile] [nameserver] topdomain\n", __progname); diff --git a/src/iodined.c b/src/iodined.c index d0602f9..984a4f9 100644 --- a/src/iodined.c +++ b/src/iodined.c @@ -2593,15 +2593,15 @@ main(int argc, char **argv) if (addrfamily == AF_UNSPEC || addrfamily == AF_INET) { dns4addr_len = get_addr(listen_ip4, port, AF_INET, AI_PASSIVE | AI_NUMERICHOST, &dns4addr); if (dns4addr_len < 0) { - warnx("Bad IPv4 address to listen on."); - usage(); + warnx("Bad IPv4 address to listen on."); + usage(); } } if (addrfamily == AF_UNSPEC || addrfamily == AF_INET6) { dns6addr_len = get_addr(listen_ip6, port, AF_INET6, AI_PASSIVE | AI_NUMERICHOST, &dns6addr); if (dns6addr_len < 0) { - warnx("Bad IPv6 address to listen on."); - usage(); + warnx("Bad IPv6 address to listen on."); + usage(); } } diff --git a/src/md5.c b/src/md5.c index 89d3d5e..99de1fe 100644 --- a/src/md5.c +++ b/src/md5.c @@ -157,18 +157,18 @@ md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) #endif #if BYTE_ORDER <= 0 /* little-endian */ { - /* - * On little-endian machines, we can process properly aligned - * data without copying it. - */ - if (!((data - (const md5_byte_t *)0) & 3)) { - /* data are properly aligned */ - X = (const md5_word_t *)data; - } else { - /* not aligned */ - memcpy(xbuf, data, 64); - X = xbuf; - } + /* + * On little-endian machines, we can process properly aligned + * data without copying it. + */ + if (!((data - (const md5_byte_t *)0) & 3)) { + /* data are properly aligned */ + X = (const md5_word_t *)data; + } else { + /* not aligned */ + memcpy(xbuf, data, 64); + X = xbuf; + } } #endif #if BYTE_ORDER == 0 @@ -176,20 +176,20 @@ md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) #endif #if BYTE_ORDER >= 0 /* big-endian */ { - /* - * On big-endian machines, we must arrange the bytes in the - * right order. - */ - const md5_byte_t *xp = data; - int i; + /* + * On big-endian machines, we must arrange the bytes in the + * right order. + */ + const md5_byte_t *xp = data; + int i; # if BYTE_ORDER == 0 - X = xbuf; /* (dynamic only) */ + X = xbuf; /* (dynamic only) */ # else # define xbuf X /* (static only) */ # endif - for (i = 0; i < 16; ++i, xp += 4) - xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); + for (i = 0; i < 16; ++i, xp += 4) + xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); } #endif } @@ -342,7 +342,7 @@ md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes) memcpy(pms->buf + offset, p, copy); if (offset + copy < 64) - return; + return; p += copy; left -= copy; md5_process(pms, pms->buf);