projects
/
platform
/
upstream
/
multipath-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc7149c
)
[lib] terminate the words fetched by get_word()
author
Christophe Varoqui
<christophe.varoqui@free.fr>
Thu, 23 Oct 2008 20:47:20 +0000
(22:47 +0200)
committer
Christophe Varoqui
<christophe.varoqui@free.fr>
Thu, 23 Oct 2008 20:47:20 +0000
(22:47 +0200)
get_word is used to parse words from device maps and status
for example. Not terminating these words ended up with unpleasant
outputs.
libmultipath/util.c
patch
|
blob
|
history
diff --git
a/libmultipath/util.c
b/libmultipath/util.c
index
c7fe6b4
..
57b2a2d
100644
(file)
--- a/
libmultipath/util.c
+++ b/
libmultipath/util.c
@@
-95,6
+95,7
@@
get_word (char * sentence, char ** word)
return 0;
}
strncpy(*word, sentence, len);
+ strchop(*word);
condlog(4, "*word = %s, len = %i", *word, len);
if (*p == '\0')