[hackers] [sbase] Remove unnecessary initializers of recursor members || Michael Forney

From: <git_AT_suckless.org>
Date: Tue, 23 Jun 2020 11:23:14 +0200 (CEST)

commit f1c3fd4e4498e4cc67ef04fdd5a4be533245b5a0
Author: Michael Forney <mforney_AT_mforney.org>
AuthorDate: Tue Jun 23 02:11:52 2020 -0700
Commit: Michael Forney <mforney_AT_mforney.org>
CommitDate: Tue Jun 23 02:20:41 2020 -0700

    Remove unnecessary initializers of recursor members

diff --git a/chgrp.c b/chgrp.c
index d336c88..4042a0d 100644
--- a/chgrp.c
+++ b/chgrp.c
_AT_@ -38,8 +38,7 @@ int
 main(int argc, char *argv[])
 {
         struct group *gr;
- struct recursor r = { .fn = chgrp, .hist = NULL, .depth = 0, .maxdepth = 1,
- .follow = 'P', .flags = 0 };
+ struct recursor r = { .fn = chgrp, .maxdepth = 1, .follow = 'P' };
 
         ARGBEGIN {
         case 'h':
diff --git a/chmod.c b/chmod.c
index 554959f..c79488b 100644
--- a/chmod.c
+++ b/chmod.c
_AT_@ -32,8 +32,7 @@ usage(void)
 int
 main(int argc, char *argv[])
 {
- struct recursor r = { .fn = chmodr, .hist = NULL, .depth = 0, .maxdepth = 1,
- .follow = 'H', .flags = DIRFIRST };
+ struct recursor r = { .fn = chmodr, .maxdepth = 1, .follow = 'H', .flags = DIRFIRST };
         size_t i;
 
         argv0 = *argv, argv0 ? (argc--, argv++) : (void *)0;
diff --git a/chown.c b/chown.c
index 3aaedef..71628eb 100644
--- a/chown.c
+++ b/chown.c
_AT_@ -45,8 +45,7 @@ main(int argc, char *argv[])
 {
         struct group *gr;
         struct passwd *pw;
- struct recursor r = { .fn = chownpwgr, .hist = NULL, .depth = 0, .maxdepth = 1,
- .follow = 'P', .flags = 0 };
+ struct recursor r = { .fn = chownpwgr, .maxdepth = 1, .follow = 'P' };
         char *owner, *group;
 
         ARGBEGIN {
diff --git a/du.c b/du.c
index fa6a8d6..1815a02 100644
--- a/du.c
+++ b/du.c
_AT_@ -60,8 +60,7 @@ usage(void)
 int
 main(int argc, char *argv[])
 {
- struct recursor r = { .fn = du, .hist = NULL, .depth = 0, .maxdepth = 0,
- .follow = 'P', .flags = 0 };
+ struct recursor r = { .fn = du, .follow = 'P' };
         off_t n = 0;
         int kflag = 0, dflag = 0;
         char *bsize;
diff --git a/mv.c b/mv.c
index c93f72d..ee313f2 100644
--- a/mv.c
+++ b/mv.c
_AT_@ -13,8 +13,7 @@ static int mv_status = 0;
 static int
 mv(const char *s1, const char *s2, int depth)
 {
- struct recursor r = { .fn = rm, .hist = NULL, .depth = 0, .maxdepth = 0,
- .follow = 'P', .flags = 0 };
+ struct recursor r = { .fn = rm, .follow = 'P' };
 
         if (!rename(s1, s2))
                 return (mv_status = 0);
diff --git a/rm.c b/rm.c
index b776d0f..8bebfcb 100644
--- a/rm.c
+++ b/rm.c
_AT_@ -13,8 +13,7 @@ usage(void)
 int
 main(int argc, char *argv[])
 {
- struct recursor r = { .fn = rm, .hist = NULL, .depth = 0, .maxdepth = 1,
- .follow = 'P', .flags = 0 };
+ struct recursor r = { .fn = rm, .maxdepth = 1, .follow = 'P' };
 
         ARGBEGIN {
         case 'f':
diff --git a/tar.c b/tar.c
index 603e544..b74c134 100644
--- a/tar.c
+++ b/tar.c
_AT_@ -514,8 +514,7 @@ usage(void)
 int
 main(int argc, char *argv[])
 {
- struct recursor r = { .fn = c, .hist = NULL, .depth = 0, .maxdepth = 0,
- .follow = 'P', .flags = DIRFIRST };
+ struct recursor r = { .fn = c, .follow = 'P', .flags = DIRFIRST };
         struct stat st;
         char *file = NULL, *dir = ".", mode = '\0';
         int fd;
Received on Tue Jun 23 2020 - 11:23:14 CEST

This archive was generated by hypermail 2.3.0 : Tue Jun 23 2020 - 11:24:34 CEST