projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07ca698
)
removed unnecessary brackets
author
Maximilian Szengel
<gnunet@maxsz.de>
Wed, 6 Jun 2012 15:00:59 +0000
(15:00 +0000)
committer
Maximilian Szengel
<gnunet@maxsz.de>
Wed, 6 Jun 2012 15:00:59 +0000
(15:00 +0000)
src/regex/regex.c
patch
|
blob
|
history
diff --git
a/src/regex/regex.c
b/src/regex/regex.c
index cd08b8dcd2e17a4c4514d9b619faba8f42d75cf1..20c496dd44dc093a4dddddc14f77c2e3da10fd5b 100644
(file)
--- a/
src/regex/regex.c
+++ b/
src/regex/regex.c
@@
-916,9
+916,17
@@
automaton_create_proofs (struct GNUNET_REGEX_Automaton *a)
if (NULL != R_last[k][k] && 0 != strcmp (R_last[k][k], ""))
{
- strcat (R_cur_r, "(");
- strcat (R_cur_r, R_last[k][k]);
- strcat (R_cur_r, ")*");
+ if (R_last[k][k][0] == '(' && R_last[k][k][strlen (R_last[k][k])-1] == ')')
+ {
+ strcat (R_cur_r, R_last[k][k]);
+ strcat (R_cur_r, "*");
+ }
+ else
+ {
+ strcat (R_cur_r, "(");
+ strcat (R_cur_r, R_last[k][k]);
+ strcat (R_cur_r, ")*");
+ }
}
if (NULL != R_last[k][j])