openvz_conf.c: remove dead store to "p"; use strchrnul

* src/openvz_conf.c (openvzReadNetworkConf): Replace open-coded
while loop with equivalent use of strchrnul.
* bootstrap (modules): Add strchrnul.
This commit is contained in:
Jim Meyering 2009-09-08 11:07:32 +02:00
parent 30506b9216
commit 5965de2f4d
2 changed files with 3 additions and 3 deletions

View File

@ -89,6 +89,7 @@ send
setsockopt
socket
stpcpy
strchrnul
strndup
strerror
strsep

View File

@ -239,15 +239,14 @@ openvzReadNetworkConf(virConnectPtr conn,
net->type = VIR_DOMAIN_NET_TYPE_BRIDGE;
char *p = token, *next = token;
char *p = token;
char cpy_temp[32];
int len;
/*parse string*/
do {
while (*next != '\0' && *next != ',') next++;
char *next = strchrnul (token, ',');
if (STRPREFIX(p, "ifname=")) {
p += 7;
/* skip in libvirt */
} else if (STRPREFIX(p, "host_ifname=")) {
p += 12;