commit 5538e539d24c9b4e27db59baa4b11b3ea3100911 parent 9d9d094e6a1bf3bfd5c971d51517a3006c3ea2e0 Author: Andrew Alderwick <andrew@alderwick.co.uk> Date: Tue, 31 Jan 2023 17:11:54 +0000 Minor optimisation. Diffstat:
M | src/devices/file.c | | | 5 | +---- |
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/devices/file.c b/src/devices/file.c @@ -140,10 +140,7 @@ retry_realpath(const char *file_name) else return NULL; } - x = malloc(strlen(r) + 1); - strcpy(x, r); - free(r); - return x; + return r; } static void