]> git.eshelyaron.com Git - emacs.git/commitdiff
* 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 02dc8d4203afc7f75590592b055335fbe275c253..95c938d7a6867d39087f6b5b48a445787490e8d2 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 51c56e49540ac51b16eb802ac6e5a25dcffd3e5e..6105d139d0ed07a94db196a3a988bc6493353e89 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);