From b438ebf3964304e9677f4960cf167bc7ff1a58d4 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 19 Mar 2022 13:12:20 -0700 Subject: [PATCH] pathcanon: remove unnecessary 'errno' save and restore a3db9ad8f8eb79a931f0bc6d087ca3b52de3dd62 removed any logic in this function that affected `errno`. So there is no need to save and restore it anymore. --- lib/ast/pathcanon.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/ast/pathcanon.c b/lib/ast/pathcanon.c index 01b02d264..2ce6c7210 100644 --- a/lib/ast/pathcanon.c +++ b/lib/ast/pathcanon.c @@ -21,7 +21,6 @@ */ #include -#include #include char *pathcanon(char *path) { @@ -30,9 +29,7 @@ char *pathcanon(char *path) { char *t; int dots; int loop; - int oerrno; - oerrno = errno; dots = loop = 0; if (*path == '/' && *(path + 1) == '/') do @@ -78,7 +75,6 @@ char *pathcanon(char *path) { && *(t - 1) == '/') t--; *t = 0; - errno = oerrno; return t; } dots = 0; -- 2.40.0