colors

extract colors from pictures
git clone git://git.2f30.org/colors
Log | Files | Refs | README | LICENSE

commit bc983136e72d9fdac10ff6f1696f74421a6f90ed
parent d6769a406dadd1ac202bba10affd6d26e9c063e4
Author: sin <sin@2f30.org>
Date:   Thu, 11 Jun 2015 11:01:42 +0100

Reuse pointer in fillpoints()

Diffstat:
Mcolors.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/colors.c b/colors.c @@ -243,13 +243,13 @@ process(void) void fillpoints(int r, int g, int b) { - struct point *p, *res; struct point n = { 0 }; + struct point *p; n.x = r, n.y = g, n.z = b; - res = RB_FIND(pointtree, &pointhead, &n); - if (res) { - res->freq++; + p = RB_FIND(pointtree, &pointhead, &n); + if (p) { + p->freq++; return; }