aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/erl_interface/src/encode/encode_ulonglong.c2
-rw-r--r--lib/erl_interface/src/legacy/erl_marshal.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/erl_interface/src/encode/encode_ulonglong.c b/lib/erl_interface/src/encode/encode_ulonglong.c
index 0f21af2a91..2f136abf96 100644
--- a/lib/erl_interface/src/encode/encode_ulonglong.c
+++ b/lib/erl_interface/src/encode/encode_ulonglong.c
@@ -52,7 +52,7 @@ int ei_encode_ulonglong(char *buf, int *index, EI_ULONGLONG p)
char *s = buf + *index;
char *s0 = s;
- if ((p < 256) && (p >= 0)) {
+ if (p < 256) {
if (!buf) s += 2;
else {
put8(s,ERL_SMALL_INTEGER_EXT);
diff --git a/lib/erl_interface/src/legacy/erl_marshal.c b/lib/erl_interface/src/legacy/erl_marshal.c
index e207b5f0f1..9558dc134b 100644
--- a/lib/erl_interface/src/legacy/erl_marshal.c
+++ b/lib/erl_interface/src/legacy/erl_marshal.c
@@ -290,7 +290,7 @@ int erl_encode_it(ETERM *ep, unsigned char **ext, int dist)
return 0;
}
/* SMALL_INTEGER */
- if ((ul < 256) && (ul >= 0)) {
+ if (ul < 256) {
*(*ext)++ = ERL_SMALL_INTEGER_EXT;
*(*ext)++ = ul & 0xff;
return 0;