From b006edd905219887047f577576710b6bee66f73c Mon Sep 17 00:00:00 2001 From: Michal Vasilek Date: Sun, 14 Nov 2021 13:50:16 +0100 Subject: [PATCH] wtype: fix patch whitespace --- srcpkgs/wtype/patches/fix_reallocarray.patch | 27 ++++++++------------ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/srcpkgs/wtype/patches/fix_reallocarray.patch b/srcpkgs/wtype/patches/fix_reallocarray.patch index 063ee3ef8c7..8fd7391ef1f 100644 --- a/srcpkgs/wtype/patches/fix_reallocarray.patch +++ b/srcpkgs/wtype/patches/fix_reallocarray.patch @@ -6,8 +6,6 @@ Subject: [PATCH] Do not use reallocarray Not available in musl. Closes #20 - -Signed-off-by: Reed Wade --- main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) @@ -17,23 +15,20 @@ index cbdbb0f..cec1cc2 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,4 @@ - + -#define _GNU_SOURCE - #include #include #include @@ -140,8 +138,8 @@ unsigned int get_key_code(struct wtype *wtype, wchar_t ch) - return i; - } - } -- wtype->keymap = reallocarray( -- wtype->keymap, ++wtype->keymap_len, sizeof(wtype->keymap[0]) -+ wtype->keymap = realloc( -+ wtype->keymap, ++wtype->keymap_len * sizeof(wtype->keymap[0]) - ); - wtype->keymap[wtype->keymap_len - 1] = ch; - return wtype->keymap_len - 1; --- -2.29.2 - + return i; + } + } +- wtype->keymap = reallocarray( +- wtype->keymap, ++wtype->keymap_len, sizeof(wtype->keymap[0]) ++ wtype->keymap = realloc( ++ wtype->keymap, ++wtype->keymap_len * sizeof(wtype->keymap[0]) + ); + wtype->keymap[wtype->keymap_len - 1] = ch; + return wtype->keymap_len - 1;