diff options
Diffstat (limited to 'scp.c')
-rw-r--r-- | scp.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: scp.c,v 1.186 2016/05/25 23:48:45 schwarze Exp $ */ | 1 | /* $OpenBSD: scp.c,v 1.187 2016/09/12 01:22:38 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * scp - secure remote copy. This is basically patched BSD rcp which | 3 | * scp - secure remote copy. This is basically patched BSD rcp which |
4 | * uses ssh to do the data transfer (instead of using rcmd). | 4 | * uses ssh to do the data transfer (instead of using rcmd). |
@@ -74,7 +74,6 @@ | |||
74 | #include "includes.h" | 74 | #include "includes.h" |
75 | 75 | ||
76 | #include <sys/types.h> | 76 | #include <sys/types.h> |
77 | #include <sys/param.h> | ||
78 | #ifdef HAVE_SYS_STAT_H | 77 | #ifdef HAVE_SYS_STAT_H |
79 | # include <sys/stat.h> | 78 | # include <sys/stat.h> |
80 | #endif | 79 | #endif |
@@ -380,10 +379,10 @@ main(int argc, char **argv) | |||
380 | /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ | 379 | /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ |
381 | sanitise_stdfd(); | 380 | sanitise_stdfd(); |
382 | 381 | ||
383 | setlocale(LC_CTYPE, ""); | 382 | msetlocale(); |
384 | 383 | ||
385 | /* Copy argv, because we modify it */ | 384 | /* Copy argv, because we modify it */ |
386 | newargv = xcalloc(MAX(argc + 1, 1), sizeof(*newargv)); | 385 | newargv = xcalloc(MAXIMUM(argc + 1, 1), sizeof(*newargv)); |
387 | for (n = 0; n < argc; n++) | 386 | for (n = 0; n < argc; n++) |
388 | newargv[n] = xstrdup(argv[n]); | 387 | newargv[n] = xstrdup(argv[n]); |
389 | argv = newargv; | 388 | argv = newargv; |
@@ -1343,7 +1342,7 @@ allocbuf(BUF *bp, int fd, int blksize) | |||
1343 | run_err("fstat: %s", strerror(errno)); | 1342 | run_err("fstat: %s", strerror(errno)); |
1344 | return (0); | 1343 | return (0); |
1345 | } | 1344 | } |
1346 | size = roundup(stb.st_blksize, blksize); | 1345 | size = ROUNDUP(stb.st_blksize, blksize); |
1347 | if (size == 0) | 1346 | if (size == 0) |
1348 | size = blksize; | 1347 | size = blksize; |
1349 | #else /* HAVE_STRUCT_STAT_ST_BLKSIZE */ | 1348 | #else /* HAVE_STRUCT_STAT_ST_BLKSIZE */ |