From b33cf8ef880fd3fc68492ecf07c029c9494d75e7 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 2 Aug 2019 21:23:24 -0400 Subject: clean up redundant return statements and conditionals --- rm.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'rm.c') diff --git a/rm.c b/rm.c index 8ea35d2..20d0225 100644 --- a/rm.c +++ b/rm.c @@ -82,14 +82,8 @@ int rm(const char *p, const struct stat *st, int typeflag, struct FTW *f) fprintf(stderr, "rm: %s: %s\n", p, strerror(errno)); retval = 1; } - return 0; - } - - if (!rm_prompt(p)) { - return 0; - } - if (unlink(p) != 0) { + } else if (rm_prompt(p) && unlink(p) != 0) { fprintf(stderr, "rm: %s: %s\n", p, strerror(errno)); retval = 1; } -- cgit v1.2.1