After check_path_wwid_change() grabbed a new copy of the wwid, it was
stripping trailing whitespace off of pp->wwid, instead of the copy it
just got.

Signed-off-by: Benjamin Marzinski <[email protected]>
---
 multipathd/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/multipathd/main.c b/multipathd/main.c
index d51bc852..50b6f3eb 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1025,9 +1025,9 @@ check_path_wwid_change(struct path *pp)
        }
 
        /*Strip any trailing blanks */
-       for (i = strlen(pp->wwid); i > 0 && pp->wwid[i-1] == ' '; i--);
+       for (i = strlen(wwid); i > 0 && wwid[i-1] == ' '; i--);
                /* no-op */
-       pp->wwid[i] = '\0';
+       wwid[i] = '\0';
        condlog(4, "%s: Got wwid %s by sgio", pp->dev, wwid);
 
        if (strncmp(wwid, pp->wwid, WWID_SIZE)) {
-- 
2.45.0


Reply via email to