mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 09:21:28 +00:00
remove unnecessary strlen call
This commit is contained in:
parent
78758ef369
commit
1e79088a72
|
@ -63,7 +63,7 @@ static void swaynag_button_execute(struct swaynag *swaynag,
|
||||||
} else if (pid == 0) {
|
} else if (pid == 0) {
|
||||||
// Child of the child. Will be reparented to the init process
|
// Child of the child. Will be reparented to the init process
|
||||||
char *terminal = getenv("TERMINAL");
|
char *terminal = getenv("TERMINAL");
|
||||||
if (button->terminal && terminal && strlen(terminal)) {
|
if (button->terminal && terminal && *terminal) {
|
||||||
sway_log(SWAY_DEBUG, "Found $TERMINAL: %s", terminal);
|
sway_log(SWAY_DEBUG, "Found $TERMINAL: %s", terminal);
|
||||||
if (!terminal_execute(terminal, button->action)) {
|
if (!terminal_execute(terminal, button->action)) {
|
||||||
swaynag_destroy(swaynag);
|
swaynag_destroy(swaynag);
|
||||||
|
@ -143,7 +143,7 @@ static void update_cursor(struct swaynag_seat *seat) {
|
||||||
const char *cursor_theme = getenv("XCURSOR_THEME");
|
const char *cursor_theme = getenv("XCURSOR_THEME");
|
||||||
unsigned cursor_size = 24;
|
unsigned cursor_size = 24;
|
||||||
const char *env_cursor_size = getenv("XCURSOR_SIZE");
|
const char *env_cursor_size = getenv("XCURSOR_SIZE");
|
||||||
if (env_cursor_size && strlen(env_cursor_size) > 0) {
|
if (env_cursor_size && *env_cursor_size) {
|
||||||
errno = 0;
|
errno = 0;
|
||||||
char *end;
|
char *end;
|
||||||
unsigned size = strtoul(env_cursor_size, &end, 10);
|
unsigned size = strtoul(env_cursor_size, &end, 10);
|
||||||
|
|
Loading…
Reference in a new issue