linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
0003-Use-inline-function-for-min-instead-of-statement-exp.patch
(840B)
1 From dc1be161f9155e92367714b38f6a45d05d4f90cd Mon Sep 17 00:00:00 2001
2 From: Michael Forney <mforney@mforney.org>
3 Date: Sat, 15 Jun 2019 20:58:46 -0700
4 Subject: [PATCH] Use inline function for min instead of statement expression
5 Upstream: https://github.com/ggreer/the_silver_searcher/pull/1324
6
7 ---
8 src/zfile.c | 9 +++++----
9 1 file changed, 5 insertions(+), 4 deletions(-)
10
11 diff --git a/src/zfile.c b/src/zfile.c
12 index e4b7566..29fbb07 100644
13 --- a/src/zfile.c
14 +++ b/src/zfile.c
15 @@ -33,10 +33,11 @@ typedef _off64_t off64_t;
16
17 #if HAVE_FOPENCOOKIE
18
19 -#define min(a, b) ({ \
20 - __typeof (a) _a = (a); \
21 - __typeof (b) _b = (b); \
22 - _a < _b ? _a : _b; })
23 +static inline size_t
24 +min(size_t a, size_t b)
25 +{
26 + return a < b ? a : b;
27 +}
28
29 static cookie_read_function_t zfile_read;
30 static cookie_seek_function_t zfile_seek;
31 --
32 2.20.1
33