* gtkutil.c (get_utf8_string): Remove redundant assignment.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 25 Jun 2012 07:54:45 +0000 (00:54 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 25 Jun 2012 07:54:45 +0000 (00:54 -0700)
sprintf already null-terminates its output.

src/ChangeLog
src/gtkutil.c

index 02dc8d4..95c938d 100644 (file)
@@ -1,5 +1,8 @@
 2012-06-25  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * gtkutil.c (get_utf8_string): Remove redundant assignment.
+       sprintf already null-terminates its output.
+
        * xfns.c (x_window): Remove redundant cast.
 
 2012-06-25  Dmitry Antipov  <dmantipov@yandex.ru>
index 51c56e4..6105d13 100644 (file)
@@ -525,7 +525,6 @@ get_utf8_string (const char *str)
         {
           strncpy (up, (char *)p, bytes_written);
           sprintf (up + bytes_written, "\\%03o", p[bytes_written]);
-          up[bytes_written+4] = '\0';
           up += bytes_written+4;
           p += bytes_written+1;
           g_error_free (err);