Skip to content

Commit

Permalink
fixup: remove _safe from wl_list_for_each
Browse files Browse the repository at this point in the history
  • Loading branch information
columbarius committed Apr 1, 2021
1 parent 0d94f3c commit 6d57585
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/screencast/wlr_screencast.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ static bool wait_chooser(pid_t pid) {
static bool wlr_output_chooser(struct xdpw_output_chooser *chooser,
struct wl_list *output_list, struct xdpw_wlr_output **output) {
logprint(DEBUG, "wlroots: output chooser called");
struct xdpw_wlr_output *out, *tmp;
struct xdpw_wlr_output *out;
size_t name_size = 0;
char *name = NULL;
FILE *f = NULL;
Expand Down Expand Up @@ -388,7 +388,7 @@ static bool wlr_output_chooser(struct xdpw_output_chooser *chooser,
logprint(ERROR, "Failed to create stream writing to pipe chooser_in");
goto error_fork;
}
wl_list_for_each_safe(out, tmp, output_list, link) {
wl_list_for_each(out, output_list, link) {
fprintf(f, "%s\n", out->name);
}
fclose(f);
Expand Down Expand Up @@ -424,7 +424,7 @@ static bool wlr_output_chooser(struct xdpw_output_chooser *chooser,
}

logprint(TRACE, "wlroots: output chooser %s selects output %s", chooser->cmd, name);
wl_list_for_each_safe(out, tmp, output_list, link) {
wl_list_for_each(out, output_list, link) {
if (strcmp(out->name, name) == 0) {
*output = out;
break;
Expand Down

0 comments on commit 6d57585

Please sign in to comment.