Skip to content
Permalink
Browse files

Cleanup feature test artifacts

Fixes #1414
  • Loading branch information...
krader1961 committed Oct 10, 2019
1 parent b18d4ae commit a5ecd1c3160ca59e790ca1ff2c03e16d5445a00b
Showing with 9 additions and 4 deletions.
  1. +9 −4 features/lchmod_fallback.c
@@ -8,11 +8,16 @@
#define PATH_MAX 1024
#endif

static char fname_hlink[PATH_MAX];
static char fname_slink[PATH_MAX];
static char fname_hlink[PATH_MAX] = "";
static char fname_slink[PATH_MAX] = "";

#define EXPECTED_SYMLINK_MODE 0751

static void cleanup() {
if (*fname_hlink) unlink(fname_hlink);
if (*fname_slink) unlink(fname_slink);
}

int main() {
struct stat statbuf;
int rv;
@@ -66,10 +71,10 @@ int main() {
goto err_exit;
}

cleanup();
return 0;

err_exit:
if (*fname_hlink) unlink(fname_hlink);
if (*fname_slink) unlink(fname_slink);
cleanup();
return 1;
}

0 comments on commit a5ecd1c

Please sign in to comment.
You can’t perform that action at this time.