changeset 242:11f8cd7d73d3

Fix return values of some helper functions.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 16 Feb 2016 16:29:52 +0200
parents d0bf513f2118
children 5049c220d2ae
files th_string.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/th_string.c	Tue Feb 16 16:29:25 2016 +0200
+++ b/th_string.c	Tue Feb 16 16:29:52 2016 +0200
@@ -121,7 +121,7 @@
     int ret = 0;
 
     if (radix > 16)
-        return 0;
+        return EOF;
 
     // Check for negative value
     if (val < 0)
@@ -146,7 +146,7 @@
 
     // Oops, the value did not fit in the buffer!
     if (val > 0)
-        return -1;
+        return EOF;
 
     // Do we want a sign prefix? Not for unsigned values
     if (!unsig)