| Message ID | 1768520616-7289-13-git-send-email-mark.hatle@kernel.crashing.org |
|---|---|
| State | New |
| Headers | show |
| Series | Consolidated pseudo patches | expand |
diff --git a/ports/unix/guts/realpath.c b/ports/unix/guts/realpath.c index c13eb93..62a92b2 100644 --- a/ports/unix/guts/realpath.c +++ b/ports/unix/guts/realpath.c @@ -23,14 +23,14 @@ return NULL; } - len = strlen(rname); - char *ep = rname + len - 1; - while (ep > rname && *ep == '/') { - --len; - *(ep--) = '\0'; - } + len = strlen(rname); + char *ep = rname + len - 1; + while (ep > rname && *ep == '/') { + --len; + *(ep--) = '\0'; + } - if (len >= pseudo_sys_path_max()) { + if (len >= pseudo_sys_path_max()) { errno = ENAMETOOLONG; return NULL; }
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> --- ports/unix/guts/realpath.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)