wtype: fix patch whitespace
This commit is contained in:
parent
bf3269813b
commit
b006edd905
|
@ -6,8 +6,6 @@ Subject: [PATCH] Do not use reallocarray
|
||||||
Not available in musl.
|
Not available in musl.
|
||||||
|
|
||||||
Closes #20
|
Closes #20
|
||||||
|
|
||||||
Signed-off-by: Reed Wade <reedwade@misterbanal.net>
|
|
||||||
---
|
---
|
||||||
main.c | 6 ++----
|
main.c | 6 ++----
|
||||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||||
|
@ -17,23 +15,20 @@ index cbdbb0f..cec1cc2 100644
|
||||||
--- a/main.c
|
--- a/main.c
|
||||||
+++ b/main.c
|
+++ b/main.c
|
||||||
@@ -1,6 +1,4 @@
|
@@ -1,6 +1,4 @@
|
||||||
|
|
||||||
-#define _GNU_SOURCE
|
-#define _GNU_SOURCE
|
||||||
-
|
-
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@@ -140,8 +138,8 @@ unsigned int get_key_code(struct wtype *wtype, wchar_t ch)
|
@@ -140,8 +138,8 @@ unsigned int get_key_code(struct wtype *wtype, wchar_t ch)
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
- wtype->keymap = reallocarray(
|
- wtype->keymap = reallocarray(
|
||||||
- wtype->keymap, ++wtype->keymap_len, sizeof(wtype->keymap[0])
|
- wtype->keymap, ++wtype->keymap_len, sizeof(wtype->keymap[0])
|
||||||
+ wtype->keymap = realloc(
|
+ wtype->keymap = realloc(
|
||||||
+ wtype->keymap, ++wtype->keymap_len * sizeof(wtype->keymap[0])
|
+ wtype->keymap, ++wtype->keymap_len * sizeof(wtype->keymap[0])
|
||||||
);
|
);
|
||||||
wtype->keymap[wtype->keymap_len - 1] = ch;
|
wtype->keymap[wtype->keymap_len - 1] = ch;
|
||||||
return wtype->keymap_len - 1;
|
return wtype->keymap_len - 1;
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue