summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-volume.c
diff options
context:
space:
mode:
authorVenky Shankar <venky@gluster.com>2011-04-11 05:48:36 +0000
committerAnand Avati <avati@gluster.com>2011-04-11 23:50:28 -0700
commit2a6598646824da9d6a957fb5b3e4c6bb40fb6835 (patch)
tree2a432e056f4803967569f58f2d70e9c63e2ef306 /cli/src/cli-cmd-volume.c
parentcfd85789c44ce3f88d6bf87d7b0a47dafb8c6d57 (diff)
build fixes
Signed-off-by: Venky Shankar <venky@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2550 (build warnings) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2550
Diffstat (limited to 'cli/src/cli-cmd-volume.c')
-rw-r--r--cli/src/cli-cmd-volume.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 3f639300..4fa25f92 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -305,7 +305,10 @@ cli_cmd_get_confirmation (struct cli_state *state, const char *question)
printf ("%s (y/n) ", question);
- fgets (answer, 4, stdin);
+ if (fgets (answer, 4, stdin) == NULL) {
+ cli_out("gluster cli read error");
+ goto out;
+ }
len = strlen (answer);