From 19a65158d9c325a3b3ee4deb59d81e2c0b73a74c Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Sun, 8 Nov 2015 10:38:31 +0100 Subject: [PATCH] lib/package_alternatives.c: get rid of goto in normpath. --- lib/package_alternatives.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/package_alternatives.c b/lib/package_alternatives.c index d69db12b..390cf29c 100644 --- a/lib/package_alternatives.c +++ b/lib/package_alternatives.c @@ -62,11 +62,10 @@ right(const char *str) static const char * normpath(char *path) { char *seg, *p; -reinit: for (p = path, seg = NULL; *p; p++) { if (strncmp(p, "/../", 4) == 0 || strncmp(p, "/..", 4) == 0) { memmove(seg ? seg : p, p+3, strlen(p+3) + 1); - goto reinit; + return normpath(path); } else if (strncmp(p, "/./", 3) == 0 || strncmp(p, "/.", 3) == 0) { memmove(p, p+2, strlen(p+2) + 1);