aboutsummaryrefslogtreecommitdiffstats
path: root/src/gsm/gsm48_ie.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gsm/gsm48_ie.c')
-rw-r--r--src/gsm/gsm48_ie.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c
index 311836d..688698d 100644
--- a/src/gsm/gsm48_ie.c
+++ b/src/gsm/gsm48_ie.c
@@ -70,7 +70,7 @@ int gsm48_decode_bcd_number(char *output, int output_len,
*
* Errors checked:
* - no or too little input data (-EIO),
- * - IE length exceeds input data size (-EIO),
+ * - IE length exceeds input data size (-EINVAL),
* - no or too little output buffer size (-ENOSPC),
* - decoded number exceeds size of the output buffer (-ENOSPC).
*
@@ -90,7 +90,7 @@ int gsm48_decode_bcd_number2(char *output, size_t output_len,
in_len = bcd_lv[0];
/* len + 1: the BCD length plus the length byte itself must fit in the input buffer. */
if (input_len < in_len + 1)
- return -EIO;
+ return -EINVAL;
for (i = 1 + h_len; i <= in_len; i++) {
/* lower nibble */