aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/support/string.c
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-12-09 11:02:54 -0800
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-12-09 11:02:54 -0800
commit4121f7a60f96f42839321988c35e4d14a34e5956 (patch)
treefa360b9e8a6435f427cad58fa8d7050d59561dd5 /src/core/support/string.c
parent26e190f3ee7c259165ce12106172f3bd25b1e323 (diff)
explicitly cast signed to unsigned where safe
Diffstat (limited to 'src/core/support/string.c')
-rw-r--r--src/core/support/string.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/support/string.c b/src/core/support/string.c
index bebeeb9513..ed000e3372 100644
--- a/src/core/support/string.c
+++ b/src/core/support/string.c
@@ -164,9 +164,9 @@ int gpr_ltoa(long value, char *string) {
}
if (neg) {
- uval = -value;
+ uval = (unsigned long)-value;
} else {
- uval = value;
+ uval = (unsigned long)value;
}
while (uval) {
string[i++] = (char)('0' + uval % 10);
@@ -190,9 +190,9 @@ int gpr_int64toa(gpr_int64 value, char *string) {
}
if (neg) {
- uval = -value;
+ uval = (gpr_uint64)-value;
} else {
- uval = value;
+ uval = (gpr_uint64)value;
}
while (uval) {
string[i++] = (char)('0' + uval % 10);