From 50de16cca278f4cbad0551083ef9f85507b4e8de Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Mon, 15 Jun 2020 23:08:52 +0200 Subject: [PATCH] termio{,link}: correct check + remove useless 'if' --- src/bin/termio.c | 2 +- src/bin/termiolink.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/bin/termio.c b/src/bin/termio.c index bbf5fc3e..30599031 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -1124,7 +1124,7 @@ _cb_ctxp_color_copy(void *data, EINA_SAFETY_ON_NULL_RETURN(sd); txt = _color_to_txt(sd); - if (!sd) return; + if (!txt) return; termio_take_selection_text(sd, ELM_SEL_TYPE_CLIPBOARD, txt); diff --git a/src/bin/termiolink.c b/src/bin/termiolink.c index 7530bc04..d9bc3845 100644 --- a/src/bin/termiolink.c +++ b/src/bin/termiolink.c @@ -1385,14 +1385,14 @@ _sharp_color_find(Termpty *ty, int sc, ty_sb_free(&sb); if (found) { - if (rp) *rp = r; - if (gp) *gp = g; - if (bp) *bp = b; - if (ap) *ap = a; - if (x1r) *x1r = x1; - if (y1r) *y1r = y1 + sc; - if (x2r) *x2r = x2; - if (y2r) *y2r = y2 + sc; + *rp = r; + *gp = g; + *bp = b; + *ap = a; + *x1r = x1; + *y1r = y1 + sc; + *x2r = x2; + *y2r = y2 + sc; } return found; }