Skip to contentSkip to conversation

lib/slre: remove superfluous assignment

PATCH New Heinrich Schuchardt 2 participants 2 messages Sep 3, 2018 – Sep 6, 2018 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/slre: remove superfluous assignment

It makes no sense to assign a value to 'res' if the next use of the variable is an assignment.

---
 lib/slre.c | 2 --
 1 file changed, 2 deletions(-)
lib/slre.c +0 -2
index e26d344865..969c46a859 100644
@@ -703,8 +703,6 @@ int main(int argc, char *argv[])
 
 		(void) memset(caps, 0, sizeof(caps));
 
-		res = 0;
-
 		res = slre_match(&slre, data, len, caps);
 		printf("Result [%d]: %d\n", i, res);
 
Signature · 1 line
2.16.2
#1 lore raw

PATCH 1/1 lib/slre: remove superfluous assignment

Quoted 4 lines · Heinrich Schuchardt

It makes no sense to assign a value to 'res' if the next use of the variable is an assignment.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180906/464af097/attachment.sig>