xref: /netbsd-src/sys/lib/libkern/uimax.c (revision 82a15b88fc2cb7cc229397e5cba811ecf43a1877)
1*82a15b88Sriastradh /*	$NetBSD: uimax.c,v 1.1 2018/09/03 16:54:54 riastradh Exp $	*/
2*82a15b88Sriastradh 
3*82a15b88Sriastradh /*
4*82a15b88Sriastradh  * Copyright (c) 1982, 1986, 1991 Regents of the University of California.
5*82a15b88Sriastradh  * All rights reserved.
6*82a15b88Sriastradh  *
7*82a15b88Sriastradh  * Redistribution and use in source and binary forms, with or without
8*82a15b88Sriastradh  * modification, are permitted provided that the following conditions
9*82a15b88Sriastradh  * are met:
10*82a15b88Sriastradh  * 1. Redistributions of source code must retain the above copyright
11*82a15b88Sriastradh  *    notice, this list of conditions and the following disclaimer.
12*82a15b88Sriastradh  * 2. Redistributions in binary form must reproduce the above copyright
13*82a15b88Sriastradh  *    notice, this list of conditions and the following disclaimer in the
14*82a15b88Sriastradh  *    documentation and/or other materials provided with the distribution.
15*82a15b88Sriastradh  * 3. Neither the name of the University nor the names of its contributors
16*82a15b88Sriastradh  *    may be used to endorse or promote products derived from this software
17*82a15b88Sriastradh  *    without specific prior written permission.
18*82a15b88Sriastradh  *
19*82a15b88Sriastradh  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20*82a15b88Sriastradh  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21*82a15b88Sriastradh  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22*82a15b88Sriastradh  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23*82a15b88Sriastradh  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24*82a15b88Sriastradh  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25*82a15b88Sriastradh  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26*82a15b88Sriastradh  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27*82a15b88Sriastradh  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28*82a15b88Sriastradh  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29*82a15b88Sriastradh  * SUCH DAMAGE.
30*82a15b88Sriastradh  *
31*82a15b88Sriastradh  *	@(#)subr_xxx.c	7.10 (Berkeley) 4/20/91
32*82a15b88Sriastradh  */
33*82a15b88Sriastradh 
34*82a15b88Sriastradh #define LIBKERN_INLINE
35*82a15b88Sriastradh #include <lib/libkern/libkern.h>
36*82a15b88Sriastradh 
37*82a15b88Sriastradh unsigned int
uimax(unsigned int a,unsigned int b)38*82a15b88Sriastradh uimax(unsigned int a, unsigned int b)
39*82a15b88Sriastradh {
40*82a15b88Sriastradh 	return (a > b ? a : b);
41*82a15b88Sriastradh }
42