mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
Fix dead stores found by scan-build
In addition to removing unused code, two minor problems are fixed: (1) `resize set` and `resize adjust` did not error when given too many arguments. (2) `orientation` was incorrectly overridden to be 'U' for scroll events in the swaybar tray `handle_click` function.
This commit is contained in:
parent
71a37ad186
commit
0af5b26e41
11 changed files with 14 additions and 32 deletions
|
|
@ -334,7 +334,7 @@ static void handle_click(struct swaybar_sni *sni, int x, int y,
|
|||
|
||||
if (strncmp(method, "Scroll", strlen("Scroll")) == 0) {
|
||||
char dir = method[strlen("Scroll")];
|
||||
char *orientation = (dir = 'U' || dir == 'D') ? "vertical" : "horizontal";
|
||||
char *orientation = (dir == 'U' || dir == 'D') ? "vertical" : "horizontal";
|
||||
int sign = (dir == 'U' || dir == 'L') ? -1 : 1;
|
||||
|
||||
sd_bus_call_method_async(sni->tray->bus, NULL, sni->service, sni->path,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue