From e444f23deffdcfbf85f01b0c34b7e3142b73bd45 Mon Sep 17 00:00:00 2001 From: "David Kaspar [Dee'Kej]" Date: Tue, 3 May 2016 12:50:54 +0200 Subject: [PATCH] tcsh-6.19.00-005-ge0-is-always-true-for-unsigned.patch added > >= 0 is always true if unsigned (c11 allows wint_t to be unsigned), > and we handle the 0 case above anyway. --- ...-005-ge0-is-always-true-for-unsigned.patch | 26 +++++++++++++++++++ tcsh.spec | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 tcsh-6.19.00-005-ge0-is-always-true-for-unsigned.patch diff --git a/tcsh-6.19.00-005-ge0-is-always-true-for-unsigned.patch b/tcsh-6.19.00-005-ge0-is-always-true-for-unsigned.patch new file mode 100644 index 0000000..bed92be --- /dev/null +++ b/tcsh-6.19.00-005-ge0-is-always-true-for-unsigned.patch @@ -0,0 +1,26 @@ +From 99b0265fd9734996ed863328bf23dd42647c1aa0 Mon Sep 17 00:00:00 2001 +From: christos +Date: Thu, 28 May 2015 14:03:00 +0000 +Subject: [PATCH] >= 0 is always true if unsigned (c11 allows wint_t to be + unsigned), and we handle the 0 case above anyway. + +--- + sh.glob.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sh.glob.c b/sh.glob.c +index d4a118d..fc510bf 100644 +--- a/sh.glob.c ++++ b/sh.glob.c +@@ -880,7 +880,7 @@ backeval(struct blk_buf *bb, struct Strbuf *word, Char *cp, int literal) + if (c != 0 && (cnt || literal)) + pword(bb, word); + hadnl = 0; +- } while (c >= 0); ++ } while (c > 0); + eof: + cleanup_until(&pvec[0]); + pwait(); +-- +2.5.5 + diff --git a/tcsh.spec b/tcsh.spec index 38614ac..92d6bb7 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -33,6 +33,7 @@ Patch001: tcsh-6.19.00-001-remove-CFLAGS-for-gethost.patch Patch002: tcsh-6.19.00-002-fix-error-messages.patch Patch003: tcsh-6.19.00-003-avoid-gcc5-calloc-optimization.patch Patch004: tcsh-6.19.00-004-remove-unused-variable.patch +Patch005: tcsh-6.19.00-005-ge0-is-always-true-for-unsigned.patch # Downstream patches -- these should be always included when doing rebase: @@ -158,6 +159,7 @@ fi tcsh-6.19.00-002-fix-error-messages.patch tcsh-6.19.00-003-avoid-gcc5-calloc-optimization.patch (replaces tcsh-6.19.00-gcc5-calloc.patch) tcsh-6.19.00-004-remove-unused-variable.patch + tcsh-6.19.00-005-ge0-is-always-true-for-unsigned.patch * Thu Apr 21 2016 David Kaspar [Dee'Kej] - 6.19.00-6 - Drop tcsh-6.15.00-closem.patch - issue not reproducible, patch not accepted by upstream