mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-28 22:23:42 +01:00
We don't need to implement strdup
After defining _GNU_SOURCE
This commit is contained in:
parent
11b1ba397f
commit
c43ef2aedd
3 changed files with 6 additions and 16 deletions
|
@ -33,5 +33,4 @@ char *cmdsep(char **stringp, const char *delim);
|
|||
// Split string into 2 by delim, handle quotes
|
||||
char *argsep(char **stringp, const char *delim);
|
||||
|
||||
char *strdup(const char *);
|
||||
#endif
|
||||
|
|
|
@ -362,12 +362,3 @@ char *argsep(char **stringp, const char *delim) {
|
|||
found:
|
||||
return start;
|
||||
}
|
||||
|
||||
char *strdup(const char *str) {
|
||||
char *dup = malloc(strlen(str) + 1);
|
||||
if (dup) {
|
||||
strcpy(dup, str);
|
||||
}
|
||||
return dup;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue