mirror of
https://github.com/curl/curl.git
synced 2026-08-03 19:00:30 +03:00
Checked in some code improvements and minor fixes that I discovered in the
FreeBSD ports system.
This commit is contained in:
parent
fce9c3a9f1
commit
6cea51585f
5 changed files with 15 additions and 10 deletions
|
|
@ -347,7 +347,7 @@ static CURLcode file_upload(struct connectdata *conn)
|
|||
|
||||
/* treat the negative resume offset value as the case of "-" */
|
||||
if(data->state.resume_from < 0) {
|
||||
if(stat(file->path, &file_stat)) {
|
||||
if(fstat(fileno(fp), &file_stat)) {
|
||||
fclose(fp);
|
||||
failf(data, "Can't get the size of %s", file->path);
|
||||
return CURLE_WRITE_ERROR;
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ static size_t fd_key_compare(void*k1, size_t k1_len, void*k2, size_t k2_len)
|
|||
{
|
||||
(void) k1_len; (void) k2_len;
|
||||
|
||||
return ((*((int* ) k1)) == (*((int* ) k2))) ? 1 : 0;
|
||||
return (*((int* ) k1)) == (*((int* ) k2));
|
||||
}
|
||||
|
||||
static size_t hash_fd(void* key, size_t key_length, size_t slots_num)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue