projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c084aeb
)
tools: Fix unused variable warnings for WISPr client
author
Marcel Holtmann
<marcel@holtmann.org>
Fri, 27 May 2011 17:29:47 +0000
(10:29 -0700)
committer
Marcel Holtmann
<marcel@holtmann.org>
Fri, 27 May 2011 17:29:47 +0000
(10:29 -0700)
tools/wispr.c
patch
|
blob
|
history
diff --git
a/tools/wispr.c
b/tools/wispr.c
index
a0002ba
..
0792f5b
100644
(file)
--- a/
tools/wispr.c
+++ b/
tools/wispr.c
@@
-307,10
+307,14
@@
struct user_input_data {
static void user_callback(struct user_input_data *data)
{
char *value;
static void user_callback(struct user_input_data *data)
{
char *value;
- int len;
- if (data->hidden == TRUE)
+ if (data->hidden == TRUE) {
+ ssize_t len;
+
len = write(data->fd, "\n", 1);
len = write(data->fd, "\n", 1);
+ if (len < 0)
+ return;
+ }
tcsetattr(data->fd, TCSADRAIN, &data->saved_termios);
tcsetattr(data->fd, TCSADRAIN, &data->saved_termios);
@@
-358,7
+362,7
@@
static gboolean user_input(const char *label, gboolean hidden,
struct termios new_termios;
GIOChannel *channel;
guint watch;
struct termios new_termios;
GIOChannel *channel;
guint watch;
-
in
t len;
+
ssize_
t len;
data = g_try_new0(struct user_input_data, 1);
if (data == NULL)
data = g_try_new0(struct user_input_data, 1);
if (data == NULL)
@@
-398,7
+402,12
@@
static gboolean user_input(const char *label, gboolean hidden,
goto error;
len = write(data->fd, label, strlen(label));
goto error;
len = write(data->fd, label, strlen(label));
+ if (len < 0)
+ goto error;
+
len = write(data->fd, ": ", 2);
len = write(data->fd, ": ", 2);
+ if (len < 0)
+ goto error;
return TRUE;
return TRUE;