mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
fix compiler warning: conversion from "long" to "size_t" may lose sign
This commit is contained in:
parent
7d22ce5573
commit
5b11e3883c
@ -442,9 +442,9 @@ Curl_cookie_add(struct SessionHandle *data,
|
|||||||
if(!queryp)
|
if(!queryp)
|
||||||
endslash = strrchr(path, '/');
|
endslash = strrchr(path, '/');
|
||||||
else
|
else
|
||||||
endslash = memrchr(path, '/', queryp - path);
|
endslash = memrchr(path, '/', (size_t)(queryp - path));
|
||||||
if(endslash) {
|
if(endslash) {
|
||||||
size_t pathlen = endslash-path+1; /* include the ending slash */
|
size_t pathlen = (size_t)(endslash-path+1); /* include ending slash */
|
||||||
co->path=malloc(pathlen+1); /* one extra for the zero byte */
|
co->path=malloc(pathlen+1); /* one extra for the zero byte */
|
||||||
if(co->path) {
|
if(co->path) {
|
||||||
memcpy(co->path, path, pathlen);
|
memcpy(co->path, path, pathlen);
|
||||||
|
Loading…
Reference in New Issue
Block a user