Skip to content

Commit

Permalink
Avoid taking a reference to a variable that dies right away.
Browse files Browse the repository at this point in the history
  • Loading branch information
tcrocomo-esss committed Nov 14, 2019
1 parent a3bf9fd commit 8f67788
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions hsetroot.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,14 @@ main(int argc, char **argv)
int noutputs = 0;
XineramaScreenInfo *outputs = NULL;

XineramaScreenInfo fake = {
.x_org = 0,
.y_org = 0,
.width = 0,
.height = 0,
};

if (opt_root) {
XineramaScreenInfo fake = {
.x_org = 0,
.y_org = 0,
.width = 0,
.height = 0,
};
noutputs = 1;
outputs = &fake;
} else {
Expand Down

0 comments on commit 8f67788

Please sign in to comment.