examples: Fix integer types in libssh_scp.c
Fixes T188 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Этот коммит содержится в:
родитель
0773696ee5
Коммит
8d62257172
@ -257,14 +257,15 @@ static int open_location(struct location *loc, int flag) {
|
|||||||
* @param recursive Copy also directories
|
* @param recursive Copy also directories
|
||||||
*/
|
*/
|
||||||
static int do_copy(struct location *src, struct location *dest, int recursive) {
|
static int do_copy(struct location *src, struct location *dest, int recursive) {
|
||||||
int size;
|
size_t size;
|
||||||
socket_t fd;
|
socket_t fd;
|
||||||
struct stat s;
|
struct stat s;
|
||||||
int w, r;
|
int w, r;
|
||||||
char buffer[16384];
|
char buffer[16384];
|
||||||
int total = 0;
|
size_t total = 0;
|
||||||
int mode;
|
mode_t mode;
|
||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
|
|
||||||
/* recursive mode doesn't work yet */
|
/* recursive mode doesn't work yet */
|
||||||
(void)recursive;
|
(void)recursive;
|
||||||
/* Get the file name and size*/
|
/* Get the file name and size*/
|
||||||
@ -394,7 +395,7 @@ static int do_copy(struct location *src, struct location *dest, int recursive) {
|
|||||||
} while(total < size);
|
} while(total < size);
|
||||||
|
|
||||||
ssh_string_free_char(filename);
|
ssh_string_free_char(filename);
|
||||||
printf("wrote %d bytes\n", total);
|
printf("wrote %zu bytes\n", total);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user