From 9136ec134c97a8aff2917760c03134f52945ff3c Mon Sep 17 00:00:00 2001 From: "deraadt@openbsd.org" Date: Mon, 12 Sep 2016 01:22:38 +0000 Subject: upstream commit Add MAXIMUM(), MINIMUM(), and ROUNDUP() to misc.h, then use those definitions rather than pulling and unknown namespace pollution. ok djm markus dtucker Upstream-ID: 712cafa816c9f012a61628b66b9fbd5687223fb8 --- scp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'scp.c') diff --git a/scp.c b/scp.c index 43ca3fa0..c67cd71d 100644 --- a/scp.c +++ b/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.186 2016/05/25 23:48:45 schwarze Exp $ */ +/* $OpenBSD: scp.c,v 1.187 2016/09/12 01:22:38 deraadt Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -74,7 +74,6 @@ #include "includes.h" #include -#include #ifdef HAVE_SYS_STAT_H # include #endif @@ -383,7 +382,7 @@ main(int argc, char **argv) setlocale(LC_CTYPE, ""); /* Copy argv, because we modify it */ - newargv = xcalloc(MAX(argc + 1, 1), sizeof(*newargv)); + newargv = xcalloc(MAXIMUM(argc + 1, 1), sizeof(*newargv)); for (n = 0; n < argc; n++) newargv[n] = xstrdup(argv[n]); argv = newargv; @@ -1343,7 +1342,7 @@ allocbuf(BUF *bp, int fd, int blksize) run_err("fstat: %s", strerror(errno)); return (0); } - size = roundup(stb.st_blksize, blksize); + size = ROUNDUP(stb.st_blksize, blksize); if (size == 0) size = blksize; #else /* HAVE_STRUCT_STAT_ST_BLKSIZE */ -- cgit v1.2.3