summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret2013-05-21 09:29:16 (EDT)
committer Eugene Tarassov2013-05-21 12:30:19 (EDT)
commit2c88e7624d369831771169cd9ccaa351134ccbbe (patch)
treee58d4382ddeea34a21861bcdc6f15da9dca1ba85
parent9bc23a4d23a5a6fddf508188569339cf58906278 (diff)
downloadorg.eclipse.tcf.agent-2c88e7624d369831771169cd9ccaa351134ccbbe.zip
org.eclipse.tcf.agent-2c88e7624d369831771169cd9ccaa351134ccbbe.tar.gz
org.eclipse.tcf.agent-2c88e7624d369831771169cd9ccaa351134ccbbe.tar.bz2
TCF Agent: read_sigset returns a pointer instead of a structure
-rw-r--r--agent/tcf/services/processes.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/agent/tcf/services/processes.c b/agent/tcf/services/processes.c
index dafd117..fb9060c 100644
--- a/agent/tcf/services/processes.c
+++ b/agent/tcf/services/processes.c
@@ -573,20 +573,18 @@ static void read_sigset_bit(InputStream * inp, void * args) {
sigset_set(set, bit, 1);
}
-static SigSet read_sigset(InputStream * inp) {
- SigSet set;
- memset(&set, 0, sizeof(set));
+static void read_sigset(InputStream * inp, SigSet * set) {
+ memset(set, 0, sizeof(SigSet));
if (json_peek(inp) == '[') {
- json_read_array(inp, read_sigset_bit, &set);
+ json_read_array(inp, read_sigset_bit, set);
}
else {
unsigned bit;
uint64_t bits = json_read_uint64(inp);
for (bit = 0; bit < 64; bit++) {
- sigset_set(&set, bit, (bits & ((uint64_t)1 << bit)) != 0);
+ sigset_set(set, bit, (bits & ((uint64_t)1 << bit)) != 0);
}
}
- return set;
}
static void command_set_signal_mask(char * token, Channel * c) {
@@ -598,9 +596,9 @@ static void command_set_signal_mask(char * token, Channel * c) {
json_read_string(&c->inp, id, sizeof(id));
json_test_char(&c->inp, MARKER_EOA);
- dont_stop = read_sigset(&c->inp);
+ read_sigset(&c->inp, &dont_stop);
json_test_char(&c->inp, MARKER_EOA);
- dont_pass = read_sigset(&c->inp);
+ read_sigset(&c->inp, &dont_pass);
json_test_char(&c->inp, MARKER_EOA);
json_test_char(&c->inp, MARKER_EOM);