]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
cwrapper: avoid surplus strlen calculations.
authorPeter Rosin <peda@lysator.liu.se>
Mon, 30 Jan 2012 14:49:05 +0000 (15:49 +0100)
committerGary V. Vaughan <gary@gnu.org>
Tue, 2 Oct 2012 14:03:17 +0000 (21:03 +0700)
* build-aux/ltmain.m4sh (func_emit_cwrapperexe_src:lt_update_exe_path):
Avoid surplus strlen calculations.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
build-aux/ltmain.m4sh

index 623c0f669f4cea770db7b9ebfeb9c26d48f079bf..eabeb4689789c5b0168d4af2e307a321609177b1 100644 (file)
@@ -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);