Awesome sauce, read description below for details.
[citadel.git] / libcitadel / lib / tools.c
index 2b5066d95fcde99bbffaad31153223dca81b1989..ffd4a5dc1d7a1ebbe6e57cb147830ce36bf69e5e 100644 (file)
@@ -1,7 +1,7 @@
 // A basic toolset containing miscellaneous functions for string manipluation,
 // encoding/decoding, and a bunch of other stuff.
 //
-// Copyright (c) 1987-2022 by the citadel.org team
+// Copyright (c) 1987-2023 by the citadel.org team
 //
 // This program is open source software.  Use, duplication, or disclosure
 // is subject to the terms of the GNU General Public License, version 3.
 #include <sys/stat.h>
 #include <errno.h>
 #include <limits.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
+#include <time.h>
 #include "libcitadel.h"
 
-
 #define TRUE  1
 #define FALSE 0
 
@@ -46,8 +34,7 @@ typedef unsigned char byte;         // Byte type
 int safestrncpy(char *dest, const char *src, size_t n) {
        int i = 0;
 
-       if (dest == NULL || src == NULL)
-       {
+       if (dest == NULL || src == NULL) {
                fprintf(stderr, "safestrncpy: NULL argument\n");
                abort();
        }