Sync usage with man page.
[netbsd-mini2440.git] / external / gpl2 / lvm2 / dist / lib / misc / util.h
blob0596674d1e59fdb354cf00f09d51880f66fc0d9c
1 /* $NetBSD$ */
3 /*
4 * Copyright (C) 2007 Red Hat, Inc. All rights reserved.
6 * This file is part of LVM2.
8 * This copyrighted material is made available to anyone wishing to use,
9 * modify, copy, or redistribute it subject to the terms and conditions
10 * of the GNU Lesser General Public License v.2.1.
12 * You should have received a copy of the GNU Lesser General Public License
13 * along with this program; if not, write to the Free Software Foundation,
14 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 #ifndef _LVM_UTIL_H
18 #define _LVM_UTIL_H
20 #define min(a, b) ({ typeof(a) _a = (a); \
21 typeof(b) _b = (b); \
22 (void) (&_a == &_b); \
23 _a < _b ? _a : _b; })
25 #define max(a, b) ({ typeof(a) _a = (a); \
26 typeof(b) _b = (b); \
27 (void) (&_a == &_b); \
28 _a > _b ? _a : _b; })
30 #define uninitialized_var(x) x = x
32 #endif