From 547bb3d699a14fb117e96c0129a4d5aed54029ca Mon Sep 17 00:00:00 2001 From: Ashish Kumar Yadav Date: Wed, 9 Dec 2020 02:13:39 +0530 Subject: [PATCH] sizeof will work for char --- dwmblocks.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dwmblocks.c b/dwmblocks.c index 67620b7..6a40072 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -14,8 +14,6 @@ #define NILL INT_MIN #define LOCKFILE "/tmp/dwmblocks.pid" -#define LENGTH(X) (sizeof X / sizeof X[0]) - typedef struct { char *const pathu; char *const pathc; @@ -360,7 +358,7 @@ main(int argc, char *argv[]) delimlength = strlen(delim) + 1; } else { delim = DELIMITER; - delimlength = LENGTH(DELIMITER); + delimlength = sizeof DELIMITER; } if (!(dpy = XOpenDisplay(NULL))) { fputs("Error: could not open display.\n", stderr);