]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/, src/: Align variable definitions
authorAlejandro Colomar <alx@kernel.org>
Sat, 26 Aug 2023 11:16:42 +0000 (13:16 +0200)
committerSerge Hallyn <serge@hallyn.com>
Wed, 13 Dec 2023 16:06:34 +0000 (10:06 -0600)
This is just a cosmetic patch in preparation for others.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/commonio.c
lib/get_pid.c
lib/nss.c
src/useradd.c

index af207506289967c2c296647c8a5103154640b4f6..b3106103fdea9c64dedbf2395a87a3f01ea50329 100644 (file)
@@ -893,9 +893,9 @@ static int write_all (const struct commonio_db *db)
 
 int commonio_close (struct commonio_db *db)
 {
-       char buf[1024];
-       int errors = 0, r;
-       struct stat sb;
+       int          errors = 0, r;
+       char         buf[1024];
+       struct stat  sb;
 
        if (!db->isopen) {
                errno = EINVAL;
index e473731fa66524952ce6cd8b78f82fba3222a8eb..6f111753c0d6839fceecedc78032912cac317acb 100644 (file)
@@ -75,10 +75,10 @@ int get_pidfd_from_fd(const char *pidfdstr)
 
 int open_pidfd(const char *pidstr)
 {
-       int proc_dir_fd;
-       int written;
-       char proc_dir_name[32];
-       pid_t target;
+       int    proc_dir_fd;
+       int    written;
+       char   proc_dir_name[32];
+       pid_t  target;
 
        if (get_pid(pidstr, &target) == 0)
                return -ENOENT;
index e2aeb0a8ed5eff98f3cee4dbfa7aba223bcbfd6c..a777e3d39302bafed1b442b5caf8e7493f3a5cfb 100644 (file)
--- a/lib/nss.c
+++ b/lib/nss.c
@@ -44,12 +44,12 @@ static void nss_exit(void) {
 
 // nsswitch_path is an argument only to support testing.
 void nss_init(const char *nsswitch_path) {
-       FILE *nssfp = NULL;
-       char *line = NULL, *p, *token, *saveptr;
-       size_t len = 0;
-       FILE *shadow_logfd = log_get_logfd();
-       char libname[65];
-       void *h;
+       char    *line = NULL, *p, *token, *saveptr;
+       char    libname[65];
+       FILE    *nssfp = NULL;
+       FILE    *shadow_logfd = log_get_logfd();
+       void    *h;
+       size_t  len = 0;
 
        if (atomic_flag_test_and_set(&nss_init_started)) {
                // Another thread has started nss_init, wait for it to complete
index 062daeac0f8edbe9dae8cd441ad0115b3a13f735..e947361b418701240257f8698eefea86ef1a8f66 100644 (file)
@@ -524,26 +524,26 @@ static void show_defaults (void)
  */
 static int set_defaults (void)
 {
-       FILE *ifp;
-       FILE *ofp;
-       char buf[1024];
-       char *new_file = NULL;
-       char *new_file_dup = NULL;
-       char *default_file = USER_DEFAULTS_FILE;
-       char *cp;
-       int ofd;
-       int wlen;
-       bool out_group = false;
-       bool out_groups = false;
-       bool out_home = false;
-       bool out_inactive = false;
-       bool out_expire = false;
-       bool out_shell = false;
-       bool out_skel = false;
-       bool out_usrskel = false;
-       bool out_create_mail_spool = false;
-       bool out_log_init = false;
-       int ret = -1;
+       int   ofd;
+       int   wlen;
+       int   ret = -1;
+       bool  out_group = false;
+       bool  out_groups = false;
+       bool  out_home = false;
+       bool  out_inactive = false;
+       bool  out_expire = false;
+       bool  out_shell = false;
+       bool  out_skel = false;
+       bool  out_usrskel = false;
+       bool  out_create_mail_spool = false;
+       bool  out_log_init = false;
+       char  buf[1024];
+       char  *new_file = NULL;
+       char  *new_file_dup = NULL;
+       char  *default_file = USER_DEFAULTS_FILE;
+       char  *cp;
+       FILE  *ifp;
+       FILE  *ofp;
 
 
        if (asprintf(&new_file, "%s%s%s", prefix, prefix[0]?"/":"", NEW_USER_FILE) == -1)