From f4942eca1e4db6087bd128e6bce3e490c3ff89f2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 23 Aug 2000 20:39:41 +0000 Subject: [PATCH] Update. 2000-08-23 Ulrich Drepper * iconv/gconv_conf.c (add_module): Remove some unneeded code to avoid adding double slashes. --- ChangeLog | 5 +++++ iconv/gconv_conf.c | 10 ++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2afc455..34a4771 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-08-23 Ulrich Drepper + + * iconv/gconv_conf.c (add_module): Remove some unneeded code to + avoid adding double slashes. + 2000-08-23 Jakub Jelinek * dirent/dirent.h (alphasort, versionsort): Move __attribute_pure__ diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c index 6d57ca5..eb0ea71 100644 --- a/iconv/gconv_conf.c +++ b/iconv/gconv_conf.c @@ -276,9 +276,6 @@ add_module (char *rp, const char *directory, size_t dir_len, void **modules, return; if (module[0] == '/') dir_len = 0; - else - /* Increment by one for the slash. */ - ++dir_len; /* See whether we must add the ending. */ need_ext = 0; @@ -318,11 +315,8 @@ add_module (char *rp, const char *directory, size_t dir_len, void **modules, if (dir_len == 0) tmp = (char *) new_module->module_name; else - { - tmp = __mempcpy ((char *) new_module->module_name, - directory, dir_len - 1); - *tmp++ = '/'; - } + tmp = __mempcpy ((char *) new_module->module_name, + directory, dir_len); tmp = __mempcpy (tmp, module, wp - module); -- 2.7.4