diff options
author | neel <neel@FreeBSD.org> | 2014-06-01 02:47:09 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2014-06-01 02:47:09 +0000 |
commit | a09b56e60a56810243d59c053381e421befbcf2e (patch) | |
tree | 36b5eb1e5e4e3f2bba86a40fbb49a5342d8f7943 /usr.sbin/bhyve/inout.c | |
parent | a6503bd2d624edd4017ade0d1edb3ad7ce366549 (diff) | |
download | FreeBSD-src-a09b56e60a56810243d59c053381e421befbcf2e.zip FreeBSD-src-a09b56e60a56810243d59c053381e421befbcf2e.tar.gz |
Use MIN(a,b) from <sys/param.h> instead of rolling our own version.
Pointed out by: grehan
Diffstat (limited to 'usr.sbin/bhyve/inout.c')
-rw-r--r-- | usr.sbin/bhyve/inout.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/usr.sbin/bhyve/inout.c b/usr.sbin/bhyve/inout.c index cb34b80..fe9e0d8 100644 --- a/usr.sbin/bhyve/inout.c +++ b/usr.sbin/bhyve/inout.c @@ -55,10 +55,6 @@ SET_DECLARE(inout_port_set, struct inout_port); #define VERIFY_IOPORT(port, size) \ assert((port) >= 0 && (size) > 0 && ((port) + (size)) <= MAX_IOPORTS) -#ifndef min -#define min(a, b) ((a) < (b) ? (a) : (b)) -#endif - static struct { const char *name; int flags; @@ -156,7 +152,7 @@ emulate_inout(struct vmctx *ctx, int vcpu, struct vm_exit *vmexit, int strict) count = vis->count & vie_size2mask(addrsize); /* Limit number of back-to-back in/out emulations to 16 */ - iterations = min(count, 16); + iterations = MIN(count, 16); while (iterations > 0) { if (vie_calculate_gla(vis->paging.cpu_mode, vis->seg_name, &vis->seg_desc, index, bytes, |