mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-30 14:30:15 +08:00
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>
This commit is contained in:
parent
822881fe3c
commit
baffe66191
@ -4153,9 +4153,9 @@ lt_update_exe_path (const char *name, const char *value)
|
|||||||
char *new_value = lt_extend_str (getenv (name), value, 0);
|
char *new_value = lt_extend_str (getenv (name), value, 0);
|
||||||
/* some systems can't cope with a ':'-terminated path #' */
|
/* some systems can't cope with a ':'-terminated path #' */
|
||||||
int len = strlen (new_value);
|
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);
|
lt_setenv (name, new_value);
|
||||||
XFREE (new_value);
|
XFREE (new_value);
|
||||||
|
Loading…
Reference in New Issue
Block a user