[vlc-commits] commit: Fix reading integers from vlcrc ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sun Jul 11 17:23:46 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 11 18:22:29 2010 +0300| [4a44ee69d45616c02e40f2c3760a5a640e560773] | committer: Rémi Denis-Courmont 

Fix reading integers from vlcrc

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4a44ee69d45616c02e40f2c3760a5a640e560773
---

 src/config/file.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/config/file.c b/src/config/file.c
index b802ce3..71a02df 100644
--- a/src/config/file.c
+++ b/src/config/file.c
@@ -145,13 +145,15 @@ static int64_t strtoi (const char *str)
 
     if (!errno)
     {
-        if ((l > INT64_C(0x7fffffffffffffff))
-         || (l < INT64_C(-0x8000000000000000)))
+#if (LLONG_MAX > 0x7fffffffffffffffLL)
+        if (l > 0x7fffffffffffffffLL
+         || l < -0x8000000000000000LL)
             errno = ERANGE;
+#endif
         if (*end)
             errno = EINVAL;
     }
-    return (int)l;
+    return l;
 }
 
 #undef config_LoadConfigFile



More information about the vlc-commits mailing list