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
|
// Split string into 2 by delim, handle quotes
|
||||||
char *argsep(char **stringp, const char *delim);
|
char *argsep(char **stringp, const char *delim);
|
||||||
|
|
||||||
char *strdup(const char *);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -362,12 +362,3 @@ char *argsep(char **stringp, const char *delim) {
|
||||||
found:
|
found:
|
||||||
return start;
|
return start;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *strdup(const char *str) {
|
|
||||||
char *dup = malloc(strlen(str) + 1);
|
|
||||||
if (dup) {
|
|
||||||
strcpy(dup, str);
|
|
||||||
}
|
|
||||||
return dup;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -104,8 +104,8 @@ static int create_pool_file(size_t size) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void buffer_release(void *data, struct wl_buffer *buffer) {
|
static void buffer_release(void *data, struct wl_buffer *buffer) {
|
||||||
struct client_state *state = data;
|
struct client_state *state = data;
|
||||||
state->busy = false;
|
state->busy = false;
|
||||||
sway_log(L_INFO, "buffer release");
|
sway_log(L_INFO, "buffer release");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,9 +138,9 @@ struct buffer *create_buffer(struct client_state *state,
|
||||||
|
|
||||||
static void frame_callback(void *data, struct wl_callback *callback, uint32_t time) {
|
static void frame_callback(void *data, struct wl_callback *callback, uint32_t time) {
|
||||||
sway_log(L_INFO, "frame callback");
|
sway_log(L_INFO, "frame callback");
|
||||||
struct client_state *state = data;
|
struct client_state *state = data;
|
||||||
wl_callback_destroy(callback);
|
wl_callback_destroy(callback);
|
||||||
state->frame_cb = NULL;
|
state->frame_cb = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct wl_callback_listener listener = {
|
static const struct wl_callback_listener listener = {
|
||||||
|
@ -177,7 +177,7 @@ struct client_state *client_setup(void) {
|
||||||
|
|
||||||
int client_prerender(struct client_state *state) {
|
int client_prerender(struct client_state *state) {
|
||||||
wl_display_dispatch_pending(state->display);
|
wl_display_dispatch_pending(state->display);
|
||||||
wl_display_flush(state->display);
|
wl_display_flush(state->display);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue