diff mbox

[U-Boot,1/1] lib/slre: remove superfluous assignment

Message ID 20170508191343.24602-1-xypron.glpk@gmx.de
State Accepted
Commit b8865e6bf0ed519e6a8b9634a776092a2812af9e
Delegated to: Tom Rini
Headers show

Commit Message

Heinrich Schuchardt May 8, 2017, 7:13 p.m. UTC
The value assigned to saved_offset is never used.

The problem was indicated by clang scan-build.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 lib/slre.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini May 12, 2017, 5:21 p.m. UTC | #1
On Mon, May 08, 2017 at 09:13:43PM +0200, xypron.glpk@gmx.de wrote:

> The value assigned to saved_offset is never used.
> 
> The problem was indicated by clang scan-build.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/lib/slre.c b/lib/slre.c
index f90749f8ed..e26d344865 100644
--- a/lib/slre.c
+++ b/lib/slre.c
@@ -441,7 +441,7 @@  loop_greedy(const struct slre *r, int pc, const char *s, int len, int *ofs)
 {
 	int	saved_offset, matched_offset;
 
-	saved_offset = matched_offset = *ofs;
+	matched_offset = *ofs;
 
 	while (match(r, pc + 2, s, len, ofs, NULL)) {
 		saved_offset = *ofs;