[frogr] Replace deprecated usage of gets() with fgets()
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Replace deprecated usage of gets() with fgets()
- Date: Wed, 12 Dec 2012 08:56:51 +0000 (UTC)
commit a987c469365bd11aade2c212a5f4104ba6c03d40
Author: Mario Sanchez Prada <msanchez gnome org>
Date: Wed Dec 12 09:56:30 2012 +0100
Replace deprecated usage of gets() with fgets()
src/examples/example.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/examples/example.c b/src/examples/example.c
index 3c117e5..f5bedce 100644
--- a/src/examples/example.c
+++ b/src/examples/example.c
@@ -29,11 +29,13 @@
#define TEST_PHOTO "testphoto.png"
+#define BUFFER_SIZE 64
+
static gchar *uploaded_photo_id = NULL;
static gchar *created_photoset_id = NULL;
static gchar *first_group_id = NULL;
static gchar *test_photo_path = NULL;
-static char buffer[64];
+static char buffer[BUFFER_SIZE];
/* Prototypes */
@@ -679,7 +681,7 @@ get_auth_url_cb (GObject *object,
/* Make a pause before continuing */
g_print ("\nEnter the verification code and press ENTER to continue: ");
- if (gets(buffer))
+ if (fgets(buffer, BUFFER_SIZE, stdin))
{
gchar *verifier = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]