summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@src.gnome.org>1998-12-10 06:18:32 +0000
committerJeff Garzik <jgarzik@src.gnome.org>1998-12-10 06:18:32 +0000
commit600ef4e7d1b45dd4cd88606b6da402ffe2a885bf (patch)
tree08c8b6d75104e9917fedafbc0f9ac9f4494368ac /tests
parent6413a421f10a81241625192dad2ca12036a08726 (diff)
downloadgtk+-600ef4e7d1b45dd4cd88606b6da402ffe2a885bf.tar.gz
use g_snprintf, eliminate need for string.h include string.h, for strlen
* gtk/testdnd.c: use g_snprintf, eliminate need for string.h * gtk/testrgb.c: include string.h, for strlen
Diffstat (limited to 'tests')
-rw-r--r--tests/testdnd.c3
-rw-r--r--tests/testrgb.c1
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/testdnd.c b/tests/testdnd.c
index d461e43903..118e04d427 100644
--- a/tests/testdnd.c
+++ b/tests/testdnd.c
@@ -1,4 +1,3 @@
-#include <string.h>
#include "gtk/gtk.h"
/* Target side drag signals */
@@ -454,7 +453,7 @@ popup_cb (gpointer data)
for (j=0; j<3; j++)
{
char buffer[128];
- sprintf(buffer, "%d,%d", i, j);
+ g_snprintf(buffer, sizeof(buffer), "%d,%d", i, j);
button = gtk_button_new_with_label (buffer);
gtk_table_attach (GTK_TABLE (table), button, i, i+1, j, j+1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
diff --git a/tests/testrgb.c b/tests/testrgb.c
index 92e6f1cc69..43b79994aa 100644
--- a/tests/testrgb.c
+++ b/tests/testrgb.c
@@ -24,6 +24,7 @@
#include <sys/time.h>
#include <stdlib.h>
#include <unistd.h>
+#include <string.h>
#include "gtk.h"