projects
/
platform
/
core
/
api
/
wifi-aware.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
085cd7e
)
Revert "fix overflow"
author
Seonah Moon
<seonah1.moon@samsung.com>
Fri, 3 Apr 2020 04:35:06 +0000
(13:35 +0900)
committer
Seonah Moon
<seonah1.moon@samsung.com>
Fri, 3 Apr 2020 04:35:06 +0000
(13:35 +0900)
This reverts commit
dd933cc386126b5debdf2f8a257cb831305e00d8
.
test/wifi-aware-publish-test.c
patch
|
blob
|
history
diff --git
a/test/wifi-aware-publish-test.c
b/test/wifi-aware-publish-test.c
index
6282269
..
56ed815
100644
(file)
--- a/
test/wifi-aware-publish-test.c
+++ b/
test/wifi-aware-publish-test.c
@@
-587,12
+587,16
@@
static gboolean __test_terminal_read_std_input(GIOChannel * source,
errno = 0;
n = read(fd, buf, 1024);
- if (n - 1 > 0 && n - 1 < 1024) {
+ if (n == 0) {
+ printf("Error: read() from stdin returns 0.\n");
+ } else if (n < 0) {
+ printf("input: read, err\n");
+ } else if (n - 1 > 0 && n < 1024) {
buf[n - 1] = '\0'; /* remove new line... */
printf("\n\n");
__process_input(buf, user_data);
} else {
- printf("
read error
\n");
+ printf("
invalid input
\n");
}
return TRUE;