mirror of
https://github.com/swaywm/sway.git
synced 2026-04-30 06:46:24 -04:00
use standard ARRAY_SIZE() macro
Replace all the custom `sizeof(array)/sizeof(element)` and `sizeof(array)/sizeof(type)` with the standard macro ARRAY_SIZE().
This commit is contained in:
parent
5f8676f214
commit
021933f735
14 changed files with 33 additions and 23 deletions
|
|
@ -783,7 +783,7 @@ static char *get_config_path(void) {
|
|||
|
||||
wordexp_t p;
|
||||
char *path;
|
||||
for (size_t i = 0; i < sizeof(config_paths) / sizeof(char *); ++i) {
|
||||
for (size_t i = 0; i < ARRAY_SIZE(config_paths); ++i) {
|
||||
if (wordexp(config_paths[i], &p, 0) == 0) {
|
||||
path = strdup(p.we_wordv[0]);
|
||||
wordfree(&p);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue