From 8effd39a5089544afc9489668c78a3d5b254de5b Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Mon, 25 Dec 2023 17:09:50 +0100 Subject: Reformatted dotQuad() --- FICS/utils.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/FICS/utils.c b/FICS/utils.c index 9c62696..5f53477 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -800,20 +800,21 @@ PUBLIC char *file_bplayer(char *fname) return ptr + 1; } - -/* Hey, leave this code alone. "a" is always in network byte order, - which is big-endian, even on a little-endian machine. I fixed this - code to handle that correctly a while ago, and someone - gratuitiously changed it so that it would work correctly only on a - big-endian machine (like a Sun). I have now changed it back. --mann -*/ -PUBLIC char *dotQuad(unsigned int a) +/* + * Hey, leave this code alone. 'a' is always in network byte order, + * which is big-endian, even on a little-endian machine. I fixed this + * code to handle that correctly a while ago and someone gratuitously + * changed it so that it would work correctly only on a big-endian + * machine (like a Sun). I have now changed it back. --mann + */ +PUBLIC char * +dotQuad(unsigned int a) { - static char tmp[20]; - unsigned char *aa = (unsigned char *) &a; + static char tmp[20]; + unsigned char *aa = (unsigned char *) &a; - sprintf(tmp, "%d.%d.%d.%d", aa[0], aa[1], aa[2], aa[3]); - return tmp; + sprintf(tmp, "%d.%d.%d.%d", aa[0], aa[1], aa[2], aa[3]); + return tmp; } PUBLIC int -- cgit v1.2.3