Commit 190cd5e5 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] min/max elimination in netfilter.h

Rusty Russell <rusty@rustcorp.com.au>: Trivial patch to remove minmax macros:
  Hi Harald,
  	The MIN & MAX etc. macros aren't used anywhere, and kernel.h
  has the new min & max anyway, which should be used.

  Cheers,
  Rusty.
parent aa2364b8
......@@ -158,26 +158,5 @@ extern void nf_invalidate_cache(int pf);
#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb)
#endif /*CONFIG_NETFILTER*/
/* From arch/i386/kernel/smp.c:
*
* Why isn't this somewhere standard ??
*
* Maybe because this procedure is horribly buggy, and does
* not deserve to live. Think about signedness issues for five
* seconds to see why. - Linus
*/
/* Two signed, return a signed. */
#define SMAX(a,b) ((ssize_t)(a)>(ssize_t)(b) ? (ssize_t)(a) : (ssize_t)(b))
#define SMIN(a,b) ((ssize_t)(a)<(ssize_t)(b) ? (ssize_t)(a) : (ssize_t)(b))
/* Two unsigned, return an unsigned. */
#define UMAX(a,b) ((size_t)(a)>(size_t)(b) ? (size_t)(a) : (size_t)(b))
#define UMIN(a,b) ((size_t)(a)<(size_t)(b) ? (size_t)(a) : (size_t)(b))
/* Two unsigned, return a signed. */
#define SUMAX(a,b) ((size_t)(a)>(size_t)(b) ? (ssize_t)(a) : (ssize_t)(b))
#define SUMIN(a,b) ((size_t)(a)<(size_t)(b) ? (ssize_t)(a) : (ssize_t)(b))
#endif /*__KERNEL__*/
#endif /*__LINUX_NETFILTER_H*/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment