]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a compiler warning on windows when sizeof(long)==sizeof(int)
authorNick Mathewson <nickm@torproject.org>
Thu, 12 May 2016 18:51:38 +0000 (14:51 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 12 May 2016 18:51:38 +0000 (14:51 -0400)
src/common/util.c

index d290f545a0a5a42acaf4a9e4433debe2ac432715..d1c8b2ee4cb389a8d0c0aed370544096dba49385 100644 (file)
@@ -3273,8 +3273,10 @@ tor_vsscanf(const char *buf, const char *pattern, va_list ap)
           *out = lng;
         } else {
           int *out = va_arg(ap, int *);
+#if LONG_MAX > INT_MAX
           if (lng < INT_MIN || lng > INT_MAX)
             return n_matched;
+#endif
           *out = (int)lng;
         }
         ++pattern;