aboutsummaryrefslogtreecommitdiffstats
path: root/sway/stringop.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-09-18 07:27:35 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-09-18 07:27:35 -0400
commit318e1be240574e316094e5ea73d32e9f9a1f7c04 (patch)
treeb93c54cba11fd92adb56dce49261d9adb88991fd /sway/stringop.c
parentFix build for debian stretch (diff)
downloadsway-318e1be240574e316094e5ea73d32e9f9a1f7c04.tar.gz
sway-318e1be240574e316094e5ea73d32e9f9a1f7c04.tar.zst
sway-318e1be240574e316094e5ea73d32e9f9a1f7c04.zip
Fix warnings introduced by prior commit
Diffstat (limited to 'sway/stringop.c')
-rw-r--r--sway/stringop.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/stringop.c b/sway/stringop.c
index 191e40c8..7a2c8317 100644
--- a/sway/stringop.c
+++ b/sway/stringop.c
@@ -311,3 +311,11 @@ char *join_list(list_t *list, char *separator) {
311 311
312 return res; 312 return res;
313} 313}
314
315char *strdup(const char *str) {
316 char *dup = malloc(strlen(str) + 1);
317 if (dup) {
318 strcpy(dup, str);
319 }
320 return dup;
321}