These variables are only initialized, and then unlink is called if they were changed from the initial value, which can't happen. Remove the variables and the conditional unlink calls. Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- libxfs/init.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/libxfs/init.c b/libxfs/init.c index ce6e62cde..a8603e2fb 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -307,17 +307,13 @@ libxfs_init(libxfs_init_t *a) { char *blockfile; char *dname; - char dpath[25]; int fd; char *logname; - char logpath[25]; char *rawfile; char *rtname; - char rtpath[25]; int rval = 0; int flags; - dpath[0] = logpath[0] = rtpath[0] = '\0'; dname = a->dname; logname = a->logname; rtname = a->rtname; @@ -418,12 +414,6 @@ libxfs_init(libxfs_init_t *a) init_caches(); rval = 1; done: - if (dpath[0]) - unlink(dpath); - if (logpath[0]) - unlink(logpath); - if (rtpath[0]) - unlink(rtpath); if (fd >= 0) close(fd); if (!rval) { -- 2.39.2