Introduction
Introduction Statistics Contact Development Disclaimer Help
fixup strdup() from the last patch - svkbd - simple virtual keyboard
git clone git://git.suckless.org/svkbd
Log
Files
Refs
README
LICENSE
---
commit 9f5404990ddc886d00624faf41d805f81857e1e3
parent 3d03b522e04f94e384aa9b7d87117a20b7ae0268
Author: Hiltjo Posthuma <[email protected]>
Date: Tue, 4 Aug 2020 23:12:03 +0200
fixup strdup() from the last patch
Diffstat:
M svkbd.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/svkbd.c b/svkbd.c
@@ -886,7 +886,6 @@ main(int argc, char *argv[]) {
signal(SIGTERM, sigterm);
-
/* parse environment variables */
if (OVERLAYS <= 1) {
enableoverlays = 0;
@@ -894,9 +893,9 @@ main(int argc, char *argv[]) {
const char* enableoverlays_env = getenv("SVKBD_ENABLEOVERLAYS"…
if (enableoverlays_env != NULL) enableoverlays = atoi(enableov…
}
- const char* layers_env = getenv("SVKBD_LAYERS");
+ char *layers_env = getenv("SVKBD_LAYERS");
if (layers_env != NULL) {
- if (!strdup(layer_names_list, layers_env)) {
+ if (!(layer_names_list = strdup(layers_env))) {
die("memory allocation error\n");
}
}
@@ -942,7 +941,7 @@ main(int argc, char *argv[]) {
if(i >= argc - 1)
continue;
free(layer_names_list);
- if (!strdup(layer_names_list, argv[++i])) {
+ if (!(layer_names_list = strdup(argv[++i]))) {
die("memory allocation error\n");
}
} else if(!strcmp(argv[i], "-s")) {
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.