Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2013-05-21 12:42:59 -0400
committerEugene Tarassov2013-05-21 12:42:59 -0400
commita6c7c0d24530c879f43ac8a3c77c386b9fca1115 (patch)
tree272ddd82b6581f420f4b567768395c352785bb9e
parent2c88e7624d369831771169cd9ccaa351134ccbbe (diff)
downloadorg.eclipse.tcf.agent-a6c7c0d24530c879f43ac8a3c77c386b9fca1115.tar.gz
org.eclipse.tcf.agent-a6c7c0d24530c879f43ac8a3c77c386b9fca1115.tar.xz
org.eclipse.tcf.agent-a6c7c0d24530c879f43ac8a3c77c386b9fca1115.zip
TCF Agent: signal set bits should use JSON 'unsigned long' instead of 'long'
-rw-r--r--agent/tcf/services/processes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/agent/tcf/services/processes.c b/agent/tcf/services/processes.c
index fb9060c1..3f87e90d 100644
--- a/agent/tcf/services/processes.c
+++ b/agent/tcf/services/processes.c
@@ -523,7 +523,7 @@ static void write_sigset(OutputStream * out, SigSet * set) {
write_stream(out, '[');
while (sigset_get_next(set, &bit)) {
if (cnt > 0) write_stream(out, ',');
- json_write_long(out, bit);
+ json_write_ulong(out, bit);
cnt++;
}
write_stream(out, ']');
@@ -569,7 +569,7 @@ static void command_get_signal_mask(char * token, Channel * c) {
static void read_sigset_bit(InputStream * inp, void * args) {
SigSet * set = (SigSet *)args;
- unsigned bit = (unsigned)json_read_long(inp);
+ unsigned bit = (unsigned)json_read_ulong(inp);
sigset_set(set, bit, 1);
}
@@ -581,7 +581,7 @@ static void read_sigset(InputStream * inp, SigSet * set) {
else {
unsigned bit;
uint64_t bits = json_read_uint64(inp);
- for (bit = 0; bit < 64; bit++) {
+ for (bit = 0; bit < sizeof(bits) * 8; bit++) {
sigset_set(set, bit, (bits & ((uint64_t)1 << bit)) != 0);
}
}

Back to the top