[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Mon Mar 23 14:22:05 MDT 2015
The branch, master has been updated
via dee2b95 lib: Move get_iconv_handle() call down
from 8de2164 s4:torture: avoid use of uninitialized variable in error case.
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit dee2b958c0412296e7944a120d28dd0a350f0223
Author: Volker Lendecke <vl at samba.org>
Date: Mon Mar 23 15:03:47 2015 +0000
lib: Move get_iconv_handle() call down
We only need this in the slow path. A good compiler might detect this,
but as get_iconv_handle() might have side-effects from a compiler's
point of view, I'm not sure it's legal to skip the call in the fast
path. Might be premature optimization, but it's low hanging fruit :-)
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed by: Ira Cooper <ira at samba.org>
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Mon Mar 23 21:21:15 CET 2015 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
lib/util/charset/util_str.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Changeset truncated at 500 lines:
diff --git a/lib/util/charset/util_str.c b/lib/util/charset/util_str.c
index d2e6cbb..1cbc1cd 100644
--- a/lib/util/charset/util_str.c
+++ b/lib/util/charset/util_str.c
@@ -369,7 +369,7 @@ _PUBLIC_ char *strchr_m(const char *src, char c)
*/
_PUBLIC_ char *strrchr_m(const char *s, char c)
{
- struct smb_iconv_handle *ic = get_iconv_handle();
+ struct smb_iconv_handle *ic;
char *ret = NULL;
if (s == NULL) {
@@ -416,6 +416,8 @@ _PUBLIC_ char *strrchr_m(const char *s, char c)
return NULL;
}
+ ic = get_iconv_handle();
+
while (*s) {
size_t size;
codepoint_t c2 = next_codepoint_handle(ic, s, &size);
--
Samba Shared Repository
More information about the samba-cvs
mailing list