diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-08-03 10:40:09 -0400 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2018-08-03 10:40:09 -0400 |
commit | 36fd84cc42ebb2933d24c2d3d4b84f3f32f065b0 (patch) | |
tree | 7982d1f38fcb3620372c1c8461de1450063e5355 /sway | |
parent | a7f7d4a488c8d3b2461122765f9904c8a411a583 (diff) |
Remove swaynag_clone and use memcpy
Diffstat (limited to 'sway')
-rw-r--r-- | sway/config.c | 5 | ||||
-rw-r--r-- | sway/swaynag.c | 9 |
2 files changed, 3 insertions, 11 deletions
diff --git a/sway/config.c b/sway/config.c index 4464b006..c1ec77f9 100644 --- a/sway/config.c +++ b/sway/config.c @@ -386,8 +386,9 @@ bool load_main_config(const char *file, bool is_active, bool validating) { config->active = true; swaynag_kill(&old_config->swaynag_config_errors); - swaynag_clone(&config->swaynag_config_errors, - &old_config->swaynag_config_errors); + memcpy(&config->swaynag_config_errors, + &old_config->swaynag_config_errors, + sizeof(struct swaynag_instance)); create_default_output_configs(); } diff --git a/sway/swaynag.c b/sway/swaynag.c index 2dc0cb21..f5370807 100644 --- a/sway/swaynag.c +++ b/sway/swaynag.c @@ -8,15 +8,6 @@ #include "log.h" #include "sway/swaynag.h" -void swaynag_clone(struct swaynag_instance *dest, - struct swaynag_instance *src) { - dest->args = src->args; - dest->pid = src->pid; - dest->fd[0] = src->fd[0]; - dest->fd[1] = src->fd[1]; - dest->detailed = src->detailed; -} - bool swaynag_spawn(const char *swaynag_command, struct swaynag_instance *swaynag) { if (swaynag->detailed) { |