From baffe661910947df0dcd5a5bbd6512fc0bce59b9 Mon Sep 17 00:00:00 2001 From: Peter Rosin Date: Mon, 30 Jan 2012 15:49:05 +0100 Subject: [PATCH] cwrapper: avoid surplus strlen calculations. * build-aux/ltmain.m4sh (func_emit_cwrapperexe_src:lt_update_exe_path): Avoid surplus strlen calculations. Signed-off-by: Peter Rosin --- build-aux/ltmain.m4sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-aux/ltmain.m4sh b/build-aux/ltmain.m4sh index 623c0f66..eabeb468 100644 --- a/build-aux/ltmain.m4sh +++ b/build-aux/ltmain.m4sh @@ -4153,9 +4153,9 @@ lt_update_exe_path (const char *name, const char *value) char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { - new_value[len-1] = '\0'; + new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value);