Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2011-10-19 23:52:31 +0000
committerEugene Tarassov2011-10-19 23:52:31 +0000
commit88871d9a99a53f81bf1cf5bf8e8ca8bf944745be (patch)
tree2b3e2344104cd11bc4c26904f98edfa33c097605
parent58658e471a8f29e9fc0ffb5c43eddf2d73f8ba7c (diff)
downloadorg.eclipse.tcf.agent-88871d9a99a53f81bf1cf5bf8e8ca8bf944745be.tar.gz
org.eclipse.tcf.agent-88871d9a99a53f81bf1cf5bf8e8ca8bf944745be.tar.xz
org.eclipse.tcf.agent-88871d9a99a53f81bf1cf5bf8e8ca8bf944745be.zip
TCF Agent: fixed compiler warning.
-rw-r--r--services/diagnostics.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/diagnostics.c b/services/diagnostics.c
index ffe94acf..5ad3d41e 100644
--- a/services/diagnostics.c
+++ b/services/diagnostics.c
@@ -379,8 +379,9 @@ static void command_create_test_streams(char * token, Channel * c) {
if (read_stream(&c->inp) != 0) exception(ERR_JSON_SYNTAX);
if (read_stream(&c->inp) != MARKER_EOM) exception(ERR_JSON_SYNTAX);
-#if SERVICE_Streams
if (buf_size0 <= 0 || buf_size1 <= 0) err = ERR_INV_NUMBER;
+
+#if SERVICE_Streams
if (!err) {
StreamsTest * st = (StreamsTest *)loc_alloc_zero(sizeof(StreamsTest));
virtual_stream_create(DIAGNOSTICS, NULL, (unsigned)buf_size0,
@@ -391,8 +392,9 @@ static void command_create_test_streams(char * token, Channel * c) {
virtual_stream_get_id(st->out, id_out, sizeof(id_out));
}
#else
- err = ERR_UNSUPPORTED;
+ if (!err) err = ERR_UNSUPPORTED;
#endif
+
write_stringz(&c->out, "R");
write_stringz(&c->out, token);
write_errno(&c->out, err);

Back to the top