From 0527fa677bfcdb34b34fd5ffef0ae8d97f25709c Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Fri, 2 Dec 2022 21:58:14 +0100 Subject: [PATCH] Add indentation to heavy use of preprocessor conditionals This clarifies which code is under which conditions, for further clenaup. Signed-off-by: Alejandro Colomar --- libmisc/pwd_init.c | 32 ++++++++++++++++---------------- libmisc/ulimit.c | 20 ++++++++++---------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/libmisc/pwd_init.c b/libmisc/pwd_init.c index 63c71e28..a37e94c8 100644 --- a/libmisc/pwd_init.c +++ b/libmisc/pwd_init.c @@ -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... */ diff --git a/libmisc/ulimit.c b/libmisc/ulimit.c index e331d46c..f835f6a8 100644 --- a/libmisc/ulimit.c +++ b/libmisc/ulimit.c @@ -12,18 +12,18 @@ #ident "$Id$" #if HAVE_ULIMIT_H -#include -#ifndef UL_SETFSIZE -#ifdef UL_SFILLIM -#define UL_SETFSIZE UL_SFILLIM -#else -#define UL_SETFSIZE 2 -#endif -#endif +# include +# ifndef UL_SETFSIZE +# ifdef UL_SFILLIM +# define UL_SETFSIZE UL_SFILLIM +# else +# define UL_SETFSIZE 2 +# endif +# endif #elif HAVE_SYS_RESOURCE_H -#include /* for struct timeval on sunos4 */ +# include /* for struct timeval on sunos4 */ /* XXX - is the above ok or should it be on ultrix? */ -#include +# include #endif #include "prototypes.h"