[hackers] [dmenu] drw: drw_scm_create: use Clr type || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Fri, 3 Nov 2017 21:11:13 +0100 (CET)

commit f0a5b75d6a0d2a62da45e9f65d92ea4a6a2d5831
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Fri Nov 3 21:10:38 2017 +0100
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Fri Nov 3 21:10:38 2017 +0100

    drw: drw_scm_create: use Clr type
    
    in this context XftColor is a too low-level type.

diff --git a/drw.c b/drw.c
index c1582e7..c638323 100644
--- a/drw.c
+++ b/drw.c
_AT_@ -200,7 +200,7 @@ drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount)
         Clr *ret;
 
         /* need at least two colors for a scheme */
- if (!drw || !clrnames || clrcount < 2 || !(ret = ecalloc(clrcount, sizeof(XftColor))))
+ if (!drw || !clrnames || clrcount < 2 || !(ret = ecalloc(clrcount, sizeof(Clr))))
                 return NULL;
 
         for (i = 0; i < clrcount; i++)
Received on Fri Nov 03 2017 - 21:11:13 CET

This archive was generated by hypermail 2.3.0 : Fri Nov 03 2017 - 21:12:29 CET