[Xfce4-commits] [apps/xfce4-terminal] 01/01: Fix g_strdup_printf() format parameters

noreply at xfce.org noreply at xfce.org
Tue Jan 8 17:22:01 CET 2019


This is an automated email from the git hooks/post-receive script.

f   2   4   0   4       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-terminal.

commit 49dbf38f28368c6e7b57fd1555c098adb279e111
Author: Igor <f2404 at yandex.ru>
Date:   Tue Jan 8 11:21:27 2019 -0500

    Fix g_strdup_printf() format parameters
    
    Found with PVS-Studio.
---
 terminal/terminal-app.c                | 2 +-
 terminal/terminal-preferences-dialog.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/terminal/terminal-app.c b/terminal/terminal-app.c
index d075539..1a831ec 100644
--- a/terminal/terminal-app.c
+++ b/terminal/terminal-app.c
@@ -385,7 +385,7 @@ terminal_app_create_window (TerminalApp       *app,
   if (role == NULL)
     {
       /* create a new window role */
-      new_role = g_strdup_printf ("%s-%u-%d", PACKAGE_NAME, (guint) time (NULL), g_random_int ());
+      new_role = g_strdup_printf ("%s-%u-%u", PACKAGE_NAME, (guint) time (NULL), g_random_int ());
       role = new_role;
     }
 
diff --git a/terminal/terminal-preferences-dialog.c b/terminal/terminal-preferences-dialog.c
index b58a0c4..e2081b0 100644
--- a/terminal/terminal-preferences-dialog.c
+++ b/terminal/terminal-preferences-dialog.c
@@ -656,9 +656,9 @@ terminal_preferences_dialog_geometry (TerminalPreferencesDialog *dialog,
 
   /* if there is an x or y value, preserve this */
   if ((mask & XValue) != 0 || (mask & YValue) != 0)
-    geo = g_strdup_printf ("%dx%d%+d%+d", w, h, x, y);
+    geo = g_strdup_printf ("%ux%u%+d%+d", w, h, x, y);
   else
-    geo = g_strdup_printf ("%dx%d", w, h);
+    geo = g_strdup_printf ("%ux%u", w, h);
 
   /* save */
   g_signal_handler_block (G_OBJECT (dialog->preferences), dialog->geometry_signal_id);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list