about summary refs log tree commit diff
path: root/iconv
diff options
context:
space:
mode:
Diffstat (limited to 'iconv')
-rw-r--r--iconv/gconv.h3
-rw-r--r--iconv/gconv_conf.c7
2 files changed, 5 insertions, 5 deletions
diff --git a/iconv/gconv.h b/iconv/gconv.h
index 879db49e1c..83f7a99541 100644
--- a/iconv/gconv.h
+++ b/iconv/gconv.h
@@ -26,6 +26,9 @@
 
 __BEGIN_DECLS
 
+/* ISO 10646 value used to signal invalid value.  */
+#define UNKNOWN_10646_CHAR	((wchar_t) 0xfffd)
+
 /* Error codes for gconv functions.  */
 enum
 {
diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
index 8a72c7aac9..fb03372def 100644
--- a/iconv/gconv_conf.c
+++ b/iconv/gconv_conf.c
@@ -322,11 +322,8 @@ read_conf_file (const char *filename, const char *directory, size_t dir_len,
       if (endp != NULL)
 	*endp = '\0';
       else
-	{
-	  endp = strchr (rp, '\n');
-	  if (endp != NULL)
-	    *endp = '\0';
-	}
+	if (rp[n - 1] == '\n')
+	  rp[n - 1] = '\0';
 
       while (isspace (*rp))
 	++rp;