[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] cwrapper: avoid duplicate strlen calculation.
From: |
Peter Rosin |
Subject: |
[PATCH] cwrapper: avoid duplicate strlen calculation. |
Date: |
Mon, 30 Jan 2012 15:32:53 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 |
Hi!
This is very close to obvious and I very nearly just pushed it out, but
what's the rush? However, I will push under the 72h rule if noone
speaks up.
It fixes half the issues reported by the clang static analyzer for
my current pet project.
Cheers,
Peter
>From a2e87f5bfed174de7d715dcf5ca5b51da4761e75 Mon Sep 17 00:00:00 2001
From: Peter Rosin <address@hidden>
Date: Mon, 30 Jan 2012 15:26:13 +0100
Subject: [PATCH] cwrapper: avoid duplicate strlen calculation.
* build-aux/ltmain.m4sh (func_emit_cwrapperexe_src:lt_update_exe_path):
Remove duplicate strlen calculation.
Signed-off-by: Peter Rosin <address@hidden>
---
build-aux/ltmain.m4sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/build-aux/ltmain.m4sh b/build-aux/ltmain.m4sh
index 922e957..a34858a 100644
--- a/build-aux/ltmain.m4sh
+++ b/build-aux/ltmain.m4sh
@@ -4150,7 +4150,7 @@ 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);
+ int len;
while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR
(new_value[len-1]))
{
new_value[len-1] = '\0';
--
1.7.5.1
- [PATCH] cwrapper: avoid duplicate strlen calculation.,
Peter Rosin <=