All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dm-multipath: fix get_word return value when the last word is found
@ 2015-03-20  9:01 Vaughan Cao
  0 siblings, 0 replies; only message in thread
From: Vaughan Cao @ 2015-03-20  9:01 UTC (permalink / raw)
  To: dm-devel; +Cc: vaughan.cao

get_word() returns how many bytes it has parsed when it gets a new word.
But the deleted code will cause 0 returned for the last word, which
breaks this semantic. It hasn't cause any trouble yet because we have
been calling it as we are certain there is an word left.

Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
---
 libmultipath/util.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libmultipath/util.c b/libmultipath/util.c
index ac0d1b2..0bb9c15 100644
--- a/libmultipath/util.c
+++ b/libmultipath/util.c
@@ -93,9 +93,6 @@ get_word (char * sentence, char ** word)
 	strchop(*word);
 	condlog(4, "*word = %s, len = %i", *word, len);
 
-	if (*p == '\0')
-		return 0;
-
 	return skip + len;
 }
 
-- 
1.9.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-20  9:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-20  9:01 [PATCH] dm-multipath: fix get_word return value when the last word is found Vaughan Cao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.