diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-09-12 01:22:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-09-12 01:22:39 +0000 |
commit | 7a1317d94a0a3de298a26b8634b903ff68fc9ac4 (patch) | |
tree | 0ddc339e4dfa78901491cb1a88001ecb9e469edb /usr.bin/ssh/sftp-common.c | |
parent | ce5053b0e1b2f389aa479c359b7837ef05716408 (diff) |
Add MAXIMUM(), MINIMUM(), and ROUNDUP() to misc.h, then use those definitions
rather than pulling <sys/param.h> and unknown namespace pollution.
ok djm markus dtucker
Diffstat (limited to 'usr.bin/ssh/sftp-common.c')
-rw-r--r-- | usr.bin/ssh/sftp-common.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/sftp-common.c b/usr.bin/ssh/sftp-common.c index 29e1f6c19a2..6706fb4cbdc 100644 --- a/usr.bin/ssh/sftp-common.c +++ b/usr.bin/ssh/sftp-common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-common.c,v 1.28 2015/01/20 23:14:00 deraadt Exp $ */ +/* $OpenBSD: sftp-common.c,v 1.29 2016/09/12 01:22:38 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Damien Miller. All rights reserved. @@ -24,7 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <sys/param.h> /* MAX */ #include <sys/types.h> #include <sys/stat.h> @@ -41,6 +40,7 @@ #include "ssherr.h" #include "sshbuf.h" #include "log.h" +#include "misc.h" #include "sftp.h" #include "sftp-common.h" @@ -239,8 +239,8 @@ ls_file(const char *name, const struct stat *st, int remote, int si_units) } if (sz == 0) tbuf[0] = '\0'; - ulen = MAX(strlen(user), 8); - glen = MAX(strlen(group), 8); + ulen = MAXIMUM(strlen(user), 8); + glen = MAXIMUM(strlen(group), 8); if (si_units) { fmt_scaled((long long)st->st_size, sbuf); snprintf(buf, sizeof buf, "%s %3u %-*s %-*s %8s %s %s", mode, |