[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 92/208: timeval.c: Use long long constant type for
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 92/208: timeval.c: Use long long constant type for timeval assignment |
Date: |
Wed, 09 Aug 2017 17:34:49 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.55.0
in repository gnurl.
commit f50124f56614d1c270bd11c7bf32ddc2a8322b7e
Author: Martin Kepplinger <address@hidden>
AuthorDate: Mon Jul 3 13:23:47 2017 +0200
timeval.c: Use long long constant type for timeval assignment
On a 64 bit host, sparse says:
timeval.c:148:15: warning: constant 0x7fffffffffffffff is so big it is long
timeval.c:149:12: warning: constant 0x7fffffffffffffff is so big it is long
so let's use long long constant types in order to prevent undesired overflow
failures.
Bug: https://curl.haxx.se/mail/lib-2017-07/0003.html
Closes #1636
Signed-off-by: Martin Kepplinger <address@hidden>
---
lib/timeval.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/timeval.c b/lib/timeval.c
index 1012b4e39..aff53cddc 100644
--- a/lib/timeval.c
+++ b/lib/timeval.c
@@ -145,8 +145,8 @@ time_t Curl_tvdiff_us(struct timeval newer, struct timeval
older)
return 0x7fffffff;
#else
/* for 64bit time_t systems */
- if(diff >= (0x7fffffffffffffff/1000000))
- return 0x7fffffffffffffff;
+ if(diff >= (0x7fffffffffffffffLL/1000000))
+ return 0x7fffffffffffffffLL;
#endif
return (newer.tv_sec-older.tv_sec)*1000000+
(time_t)(newer.tv_usec-older.tv_usec);
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 187/208: travis: add osx build with darwinssl, (continued)
- [GNUnet-SVN] [gnurl] 187/208: travis: add osx build with darwinssl, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 139/208: ISSUE_TEMPLATE: Add a comment not to file security issues on github, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 164/208: AppVeyor: now really use CURL_WERROR, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 79/208: progress: prevent resetting t_starttransfer, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 201/208: curl: detect and bail out early on parameter integer overflows, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 173/208: BUGS: clarify how to report security related bugs, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 85/208: test1450: fix up DICT server in torture mode, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 166/208: cmake: support make uninstall, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 170/208: configure: fix the check for IdnToUnicode, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 60/208: CONTRIBUTE.md: mention the out-of-tree build test too, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 92/208: timeval.c: Use long long constant type for timeval assignment,
gnunet <=
- [GNUnet-SVN] [gnurl] 107/208: inet_pton: fix include on windows to get prototype, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 102/208: smb: add support for CURLOPT_FILETIME, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 103/208: RELEASE-NOTES: synced with 596cfb6c0, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 71/208: tool_getparam: fix memory leak on test 1147 OOM (torture tests), gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 146/208: winbuild: re-enable warning C4127 for curl tool, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 175/208: curl_threads: fix MSVC compiler warning, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 196/208: getparameter: avoid returning uninitialized 'usedarg', gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 182/208: netrc: skip lines starting with '#', gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 58/208: --request-target: instead of --strip-path-slash, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 47/208: automake: use $(MKHELP) variable instead if constant mkhelp.pl, gnunet, 2017/08/09