提交 30b07a42 编写于 作者: L Laine Stump

util: make virMacAddrParse more versatile

Previously the MAC address text was required to be terminated with a
NULL. After this, it can be terminated with a space or any control
character.
上级 606a0133
......@@ -169,7 +169,7 @@ virMacAddrParse(const char* str, virMacAddrPtr addr)
addr->addr[i] = (unsigned char) result;
if ((i == 5) && (*end_ptr == '\0'))
if ((i == 5) && (*end_ptr <= ' '))
return 0;
if (*end_ptr != ':')
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册