SHA256
1
0
forked from pool/patch
patch/reject-print-function-01-drop-useless-test.patch
Jean Delvare 88d552055b - reject-print-function-01-drop-useless-test.patch: Drop useless
test in another_hunk().
- reject-print-function-02-handle-unified-format.patch: Preserve C
  function name in unified rejects (bnc#904519).

OBS-URL: https://build.opensuse.org/package/show/devel:tools/patch?expand=0&rev=41
2014-11-10 10:38:51 +00:00

23 lines
652 B
Diff

From: Jean Delvare <jdelvare@suse.de>
Subject: Drop useless test in another_hunk()
Upstream: Submitted (2014-11-10)
This test will always succeed so it is either broken or useless. The
equivalent code path for context patches doesn't have this test so I
suppose it's OK to just remove it.
---
src/pch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/pch.c
+++ b/src/pch.c
@@ -1651,7 +1651,7 @@ another_hunk (enum diff difftype, bool r
if (*s == ' ') s++;
if (*s++ != '@')
malformed ();
- if (*s++ == '@' && *s == ' ' && *s != '\0')
+ if (*s++ == '@' && *s == ' ')
{
p_c_function = s;
while (*s != '\n')