diff options
author | deraadt@openbsd.org <deraadt@openbsd.org> | 2016-09-12 03:22:38 +0200 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2016-09-12 05:46:29 +0200 |
commit | 9136ec134c97a8aff2917760c03134f52945ff3c (patch) | |
tree | bfcab357e6e0f510d9b63bac43b18097e89fa58a /sftp-common.c | |
parent | upstream commit (diff) | |
download | openssh-9136ec134c97a8aff2917760c03134f52945ff3c.tar.xz openssh-9136ec134c97a8aff2917760c03134f52945ff3c.zip |
upstream commit
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
Upstream-ID: 712cafa816c9f012a61628b66b9fbd5687223fb8
Diffstat (limited to 'sftp-common.c')
-rw-r--r-- | sftp-common.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sftp-common.c b/sftp-common.c index 9dc1f9831..3a70c52dd 100644 --- a/sftp-common.c +++ b/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. @@ -26,7 +26,6 @@ #include "includes.h" -#include <sys/param.h> /* MAX */ #include <sys/types.h> #include <sys/stat.h> @@ -45,6 +44,7 @@ #include "ssherr.h" #include "sshbuf.h" #include "log.h" +#include "misc.h" #include "sftp.h" #include "sftp-common.h" @@ -243,8 +243,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, |