From 379b18218d18a049b5423bbb9bb22e066ffc3f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Mon, 15 Aug 2022 15:14:25 -0300 Subject: ldso: make exit condition clearer in fixup_rpath breaking out of the switch-case when l==-1 means the conditional below will necessarily be true (-1 >= buf_size, a size_t variable) and the function will return 0. it is, however, somewhat unclear that that's what's happening. simply returning there is simpler --- ldso/dynlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ldso/dynlink.c') diff --git a/ldso/dynlink.c b/ldso/dynlink.c index fd09ca69..03f5fd59 100644 --- a/ldso/dynlink.c +++ b/ldso/dynlink.c @@ -886,7 +886,7 @@ static int fixup_rpath(struct dso *p, char *buf, size_t buf_size) case ENOENT: case ENOTDIR: case EACCES: - break; + return 0; default: return -1; } -- cgit v1.2.1