mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
Compiler warning fix
This commit is contained in:
parent
fbc4407583
commit
e09450103b
@ -251,7 +251,7 @@ static int rlimit(int keep_open)
|
|||||||
|
|
||||||
/* verify that we won't overflow size_t in malloc() */
|
/* verify that we won't overflow size_t in malloc() */
|
||||||
|
|
||||||
if (num_open.rlim_max > ((size_t)-1) / sizeof(*fd)) {
|
if ((size_t)(num_open.rlim_max) > ((size_t)-1) / sizeof(*fd)) {
|
||||||
sprintf(strbuff1, fmt, num_open.rlim_max);
|
sprintf(strbuff1, fmt, num_open.rlim_max);
|
||||||
sprintf(strbuff, "unable to allocate an array for %s "
|
sprintf(strbuff, "unable to allocate an array for %s "
|
||||||
"file descriptors, would overflow size_t", strbuff1);
|
"file descriptors, would overflow size_t", strbuff1);
|
||||||
|
@ -233,7 +233,7 @@ static int rlimit(int keep_open)
|
|||||||
|
|
||||||
/* verify that we won't overflow size_t in malloc() */
|
/* verify that we won't overflow size_t in malloc() */
|
||||||
|
|
||||||
if (num_open.rlim_max > ((size_t)-1) / sizeof(*fd)) {
|
if ((size_t)(num_open.rlim_max) > ((size_t)-1) / sizeof(*fd)) {
|
||||||
sprintf(strbuff1, fmt, num_open.rlim_max);
|
sprintf(strbuff1, fmt, num_open.rlim_max);
|
||||||
sprintf(strbuff, "unable to allocate an array for %s "
|
sprintf(strbuff, "unable to allocate an array for %s "
|
||||||
"file descriptors, would overflow size_t", strbuff1);
|
"file descriptors, would overflow size_t", strbuff1);
|
||||||
|
Loading…
Reference in New Issue
Block a user