summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Rosin <peda@lysator.liu.se>2012-01-30 15:49:05 +0100
committerPeter Rosin <peda@lysator.liu.se>2012-01-30 15:49:05 +0100
commit7b945cfdaaad8a87a19fcf837dd4bc04f399b1ab (patch)
treee54178aec08b782c86a82fcad83f28a128606d00
parent7a78cca31bca68f3cf2e398d26b03f3980331d72 (diff)
downloadlibtool-7b945cfdaaad8a87a19fcf837dd4bc04f399b1ab.tar.gz
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 <peda@lysator.liu.se>
-rw-r--r--build-aux/ltmain.m4sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/build-aux/ltmain.m4sh b/build-aux/ltmain.m4sh
index 922e9576..00d063c1 100644
--- a/build-aux/ltmain.m4sh
+++ b/build-aux/ltmain.m4sh
@@ -4151,9 +4151,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);