Remove unnecessary initializers of recursor members
This commit is contained in:
parent
fdb9084da9
commit
f1c3fd4e44
3
chgrp.c
3
chgrp.c
@ -38,8 +38,7 @@ int
|
|||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct group *gr;
|
struct group *gr;
|
||||||
struct recursor r = { .fn = chgrp, .hist = NULL, .depth = 0, .maxdepth = 1,
|
struct recursor r = { .fn = chgrp, .maxdepth = 1, .follow = 'P' };
|
||||||
.follow = 'P', .flags = 0 };
|
|
||||||
|
|
||||||
ARGBEGIN {
|
ARGBEGIN {
|
||||||
case 'h':
|
case 'h':
|
||||||
|
3
chmod.c
3
chmod.c
@ -32,8 +32,7 @@ usage(void)
|
|||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct recursor r = { .fn = chmodr, .hist = NULL, .depth = 0, .maxdepth = 1,
|
struct recursor r = { .fn = chmodr, .maxdepth = 1, .follow = 'H', .flags = DIRFIRST };
|
||||||
.follow = 'H', .flags = DIRFIRST };
|
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
argv0 = *argv, argv0 ? (argc--, argv++) : (void *)0;
|
argv0 = *argv, argv0 ? (argc--, argv++) : (void *)0;
|
||||||
|
3
chown.c
3
chown.c
@ -45,8 +45,7 @@ main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
struct group *gr;
|
struct group *gr;
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
struct recursor r = { .fn = chownpwgr, .hist = NULL, .depth = 0, .maxdepth = 1,
|
struct recursor r = { .fn = chownpwgr, .maxdepth = 1, .follow = 'P' };
|
||||||
.follow = 'P', .flags = 0 };
|
|
||||||
char *owner, *group;
|
char *owner, *group;
|
||||||
|
|
||||||
ARGBEGIN {
|
ARGBEGIN {
|
||||||
|
3
du.c
3
du.c
@ -60,8 +60,7 @@ usage(void)
|
|||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct recursor r = { .fn = du, .hist = NULL, .depth = 0, .maxdepth = 0,
|
struct recursor r = { .fn = du, .follow = 'P' };
|
||||||
.follow = 'P', .flags = 0 };
|
|
||||||
off_t n = 0;
|
off_t n = 0;
|
||||||
int kflag = 0, dflag = 0;
|
int kflag = 0, dflag = 0;
|
||||||
char *bsize;
|
char *bsize;
|
||||||
|
3
mv.c
3
mv.c
@ -13,8 +13,7 @@ static int mv_status = 0;
|
|||||||
static int
|
static int
|
||||||
mv(const char *s1, const char *s2, int depth)
|
mv(const char *s1, const char *s2, int depth)
|
||||||
{
|
{
|
||||||
struct recursor r = { .fn = rm, .hist = NULL, .depth = 0, .maxdepth = 0,
|
struct recursor r = { .fn = rm, .follow = 'P' };
|
||||||
.follow = 'P', .flags = 0 };
|
|
||||||
|
|
||||||
if (!rename(s1, s2))
|
if (!rename(s1, s2))
|
||||||
return (mv_status = 0);
|
return (mv_status = 0);
|
||||||
|
3
rm.c
3
rm.c
@ -13,8 +13,7 @@ usage(void)
|
|||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct recursor r = { .fn = rm, .hist = NULL, .depth = 0, .maxdepth = 1,
|
struct recursor r = { .fn = rm, .maxdepth = 1, .follow = 'P' };
|
||||||
.follow = 'P', .flags = 0 };
|
|
||||||
|
|
||||||
ARGBEGIN {
|
ARGBEGIN {
|
||||||
case 'f':
|
case 'f':
|
||||||
|
3
tar.c
3
tar.c
@ -514,8 +514,7 @@ usage(void)
|
|||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct recursor r = { .fn = c, .hist = NULL, .depth = 0, .maxdepth = 0,
|
struct recursor r = { .fn = c, .follow = 'P', .flags = DIRFIRST };
|
||||||
.follow = 'P', .flags = DIRFIRST };
|
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *file = NULL, *dir = ".", mode = '\0';
|
char *file = NULL, *dir = ".", mode = '\0';
|
||||||
int fd;
|
int fd;
|
||||||
|
Loading…
Reference in New Issue
Block a user