aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/utils.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-05-27 15:27:19 +0200
committerSverker Eriksson <[email protected]>2016-05-27 15:27:19 +0200
commit23b38b4409d52eeb42d87202c49867295b066c47 (patch)
tree6aebd99b44200341c5a17f45ea1d2fbf42187773 /erts/emulator/beam/utils.c
parentaf9e26bc0cdbbd1a5a81e760501c307c3176fea0 (diff)
parent0f8fab10dad03273b75f205bd9fae746d2077829 (diff)
downloadotp-23b38b4409d52eeb42d87202c49867295b066c47.tar.gz
otp-23b38b4409d52eeb42d87202c49867295b066c47.tar.bz2
otp-23b38b4409d52eeb42d87202c49867295b066c47.zip
Merge branch 'richcarl/erts/fix-init-stop/PR-911/OTP-13630/OTP-13631'
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r--erts/emulator/beam/utils.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index cedc88e5fe..f0418446a8 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -3893,8 +3893,10 @@ void bin_write(int to, void *to_arg, byte* buf, size_t sz)
}
/* Fill buf with the contents of bytelist list
- return number of chars in list or -1 for error */
-
+ * return number of chars in list
+ * or -1 for type error
+ * or -2 for not enough buffer space (buffer contains truncated result)
+ */
Sint
intlist_to_buf(Eterm list, char *buf, Sint len)
{
@@ -3917,7 +3919,7 @@ intlist_to_buf(Eterm list, char *buf, Sint len)
return -1;
listptr = list_val(*(listptr + 1));
}
- return -1; /* not enough space */
+ return -2; /* not enough space */
}
/*