From e7ee5bd7a42e63e991a7ecb8d03c83d59a9b35f4 Mon Sep 17 00:00:00 2001 From: Nelson Ferreira Date: Wed, 7 Mar 2012 10:21:00 -0500 Subject: [PATCH] Coverity: CID 400010: Improper use of negative value * src/ui/minibuf.c (echo_area_append): Make sure length<0 also returns early here. Signed-off-by: Nelson Ferreira --- src/ui/minibuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/minibuf.c b/src/ui/minibuf.c index 28c7d1c..3627e6c 100644 --- a/src/ui/minibuf.c +++ b/src/ui/minibuf.c @@ -680,7 +680,7 @@ echo_area_append(struct frame *f, const Bufbyte * nonreloc, Lisp_Object reloc, fixup_internal_substring(nonreloc, reloc, offset, &length); /* also check it here, in case the string was really blank. */ - if (length == 0) + if (length <= 0) return; if (!NILP(Ffboundp(Qappend_message))) { -- 2.25.1