]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Add indentation to heavy use of preprocessor conditionals
authorAlejandro Colomar <alx@kernel.org>
Fri, 2 Dec 2022 20:58:14 +0000 (21:58 +0100)
committerSerge Hallyn <serge@hallyn.com>
Thu, 15 Dec 2022 22:22:05 +0000 (16:22 -0600)
This clarifies which code is under which conditions,
for further clenaup.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
libmisc/pwd_init.c
libmisc/ulimit.c

index 63c71e28d873b6757f0176f44d07e39c7b7fd3e6..a37e94c8d03758de0eabf43e5eb829751378a857 100644 (file)
@@ -31,32 +31,32 @@ void pwd_init (void)
 #ifdef HAVE_SYS_RESOURCE_H
        struct rlimit rlim;
 
-#ifdef RLIMIT_CORE
+# ifdef RLIMIT_CORE
        rlim.rlim_cur = rlim.rlim_max = 0;
        setrlimit (RLIMIT_CORE, &rlim);
-#endif
+# endif
        rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY;
-#ifdef RLIMIT_AS
+# ifdef RLIMIT_AS
        setrlimit (RLIMIT_AS, &rlim);
-#endif
-#ifdef RLIMIT_CPU
+# endif
+# ifdef RLIMIT_CPU
        setrlimit (RLIMIT_CPU, &rlim);
-#endif
-#ifdef RLIMIT_DATA
+# endif
+# ifdef RLIMIT_DATA
        setrlimit (RLIMIT_DATA, &rlim);
-#endif
-#ifdef RLIMIT_FSIZE
+# endif
+# ifdef RLIMIT_FSIZE
        setrlimit (RLIMIT_FSIZE, &rlim);
-#endif
-#ifdef RLIMIT_NOFILE
+# endif
+# ifdef RLIMIT_NOFILE
        setrlimit (RLIMIT_NOFILE, &rlim);
-#endif
-#ifdef RLIMIT_RSS
+# endif
+# ifdef RLIMIT_RSS
        setrlimit (RLIMIT_RSS, &rlim);
-#endif
-#ifdef RLIMIT_STACK
+# endif
+# ifdef RLIMIT_STACK
        setrlimit (RLIMIT_STACK, &rlim);
-#endif
+# endif
 #else                          /* !HAVE_SYS_RESOURCE_H */
        set_filesize_limit (30000);
        /* don't know how to set the other limits... */
index e331d46c8dbed16228a0b9f3818e9d31b60994e0..f835f6a84ce00c322f3ba8c6d835936f2db79465 100644 (file)
 #ident "$Id$"
 
 #if HAVE_ULIMIT_H
-#include <ulimit.h>
-#ifndef UL_SETFSIZE
-#ifdef UL_SFILLIM
-#define UL_SETFSIZE UL_SFILLIM
-#else
-#define UL_SETFSIZE 2
-#endif
-#endif
+# include <ulimit.h>
+# ifndef UL_SETFSIZE
+#  ifdef UL_SFILLIM
+#   define UL_SETFSIZE UL_SFILLIM
+#  else
+#   define UL_SETFSIZE 2
+#  endif
+# endif
 #elif HAVE_SYS_RESOURCE_H
-#include <sys/time.h>          /* for struct timeval on sunos4 */
+# include <sys/time.h>         /* for struct timeval on sunos4 */
 /* XXX - is the above ok or should it be <time.h> on ultrix? */
-#include <sys/resource.h>
+# include <sys/resource.h>
 #endif
 #include "prototypes.h"