mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Prefer using the MIN() function macro over the min() inline function
in the LinuxKPI. Linux defines min() to be a macro, while in FreeBSD min() is a static inline function clamping its arguments to "unsigned int". MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking
This commit is contained in:
parent
ea37efb754
commit
a399cf139b
2 changed files with 2 additions and 2 deletions
|
|
@ -360,7 +360,7 @@ linux_reg_op(unsigned long *bitmap, int pos, int order, int reg_op)
|
|||
index = pos / BITS_PER_LONG;
|
||||
offset = pos - (index * BITS_PER_LONG);
|
||||
nlongs_reg = BITS_TO_LONGS(nbits_reg);
|
||||
nbitsinlong = min(nbits_reg, BITS_PER_LONG);
|
||||
nbitsinlong = MIN(nbits_reg, BITS_PER_LONG);
|
||||
|
||||
mask = (1UL << (nbitsinlong - 1));
|
||||
mask += mask - 1;
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ __sg_alloc_table_from_pages(struct sg_table *sgt,
|
|||
}
|
||||
|
||||
seg_size = ((j - cur) << PAGE_SHIFT) - off;
|
||||
sg_set_page(s, pages[cur], min(size, seg_size), off);
|
||||
sg_set_page(s, pages[cur], MIN(size, seg_size), off);
|
||||
size -= seg_size;
|
||||
off = 0;
|
||||
cur = j;
|
||||
|
|
|
|||
Loading…
Reference in a new issue