mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
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:
parent
30506b9216
commit
5965de2f4d
@ -89,6 +89,7 @@ send
|
||||
setsockopt
|
||||
socket
|
||||
stpcpy
|
||||
strchrnul
|
||||
strndup
|
||||
strerror
|
||||
strsep
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user