Remove LENGTH macro and replace with glib one

This commit is contained in:
Benedikt Heine 2017-10-10 23:11:52 +02:00
parent 4d59e3a2e2
commit bc3c6466ca
3 changed files with 1 additions and 4 deletions

View File

@ -20,8 +20,6 @@
#include "x11/x.h"
#include "x11/screen.h"
#define LENGTH(X) (sizeof X / sizeof X[0])
#ifndef VERSION
#define VERSION "version info needed"
#endif

View File

@ -11,7 +11,6 @@
#define ERR(msg) printf("%s : %d\n", (msg), __LINE__)
#define PERR(msg, errnum) printf("(%d) %s : %s\n", __LINE__, (msg), (strerror(errnum)))
#define LENGTH(X) (sizeof X / sizeof X[0])
#define ColLast 3
#define ColFrame 2

View File

@ -598,7 +598,7 @@ void load_settings(char *cmdline_config_path)
);
/* push hardcoded default rules into rules list */
for (int i = 0; i < LENGTH(default_rules); i++) {
for (int i = 0; i < G_N_ELEMENTS(default_rules); i++) {
rules = g_slist_insert(rules, &(default_rules[i]), -1);
}