wtype: fix patch whitespace
This commit is contained in:
parent
bf3269813b
commit
b006edd905
1 changed files with 11 additions and 16 deletions
|
@ -6,8 +6,6 @@ Subject: [PATCH] Do not use reallocarray
|
|||
Not available in musl.
|
||||
|
||||
Closes #20
|
||||
|
||||
Signed-off-by: Reed Wade <reedwade@misterbanal.net>
|
||||
---
|
||||
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 <fcntl.h>
|
||||
#include <locale.h>
|
||||
#include <stdbool.h>
|
||||
@@ -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;
|
||||
|
|
Loading…
Reference in a new issue