Git development
 help / color / mirror / Atom feed
* [GSOC][PATCH] Fixed an issue which contained extra unnecessary code
@ 2019-03-10 14:31 sushmaunnibhavi
  2019-03-10 18:10 ` Christian Couder
  2019-03-10 18:26 ` Thomas Gummerer
  0 siblings, 2 replies; 3+ messages in thread
From: sushmaunnibhavi @ 2019-03-10 14:31 UTC (permalink / raw)
  To: git

From 5a6c233c6bf0a35aca000b32b9e936a34532900a Mon Sep 17 00:00:00 2001
From: sushmaunnibhavi <sushmaunnibhavi@gmail.com>
Date: Sun, 10 Mar 2019 19:37:33 +0530
Subject: [GSOC][PATCH] Fixed an issue which contained extra unnecessary code
Signed-off-by: Sushma Unnibhavi <sushmaunnibhavi425@gmail.com>
---
Since '\n' and '\0' are char_len==1,it is not necessary to check if the char_len<=1.
 compat/regex/regexec.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/compat/regex/regexec.c b/compat/regex/regexec.c
index 1b5d89fd5e..df62597531 100644
--- a/compat/regex/regexec.c
+++ b/compat/regex/regexec.c
@@ -3799,11 +3799,6 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
   char_len = re_string_char_size_at (input, str_idx);
   if (node->type == OP_PERIOD)
     {
-      if (char_len <= 1)
-	return 0;
-      /* FIXME: I don't think this if is needed, as both '\n'
-	 and '\0' are char_len == 1.  */
-      /* '.' accepts any one character except the following two cases.  */
       if ((!(dfa->syntax & RE_DOT_NEWLINE) &&
 	   re_string_byte_at (input, str_idx) == '\n') ||
 	  ((dfa->syntax & RE_DOT_NOT_NULL) &&
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-10 18:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-10 14:31 [GSOC][PATCH] Fixed an issue which contained extra unnecessary code sushmaunnibhavi
2019-03-10 18:10 ` Christian Couder
2019-03-10 18:26 ` Thomas Gummerer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox