mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
build: silence recent syntax check violations
An upstream gnulib bug[1] meant that some of our syntax checks weren't being run. Fix up our offenders before we upgrade to a newer gnulib. [1] https://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00194.html * src/util/virnetdevtap.c (virNetDevTapCreate): Use flags. * tests/lxcxml2xmltest.c (mymain): Strip useless ().
This commit is contained in:
parent
63e086310f
commit
e8aa5a16c9
@ -129,12 +129,14 @@ virNetDevProbeVnetHdr(int tapfd)
|
||||
*/
|
||||
int virNetDevTapCreate(char **ifname,
|
||||
int *tapfd,
|
||||
unsigned int flags ATTRIBUTE_UNUSED)
|
||||
unsigned int flags)
|
||||
{
|
||||
int fd;
|
||||
struct ifreq ifr;
|
||||
int ret = -1;
|
||||
|
||||
virCheckFlags(VIR_NETDEV_TAP_CREATE_VNET_HDR, -1);
|
||||
|
||||
if ((fd = open("/dev/net/tun", O_RDWR)) < 0) {
|
||||
virReportSystemError(errno, "%s",
|
||||
_("Unable to open /dev/net/tun, is tun module loaded?"));
|
||||
@ -237,8 +239,9 @@ cleanup:
|
||||
#else /* ! TUNSETIFF */
|
||||
int virNetDevTapCreate(char **ifname ATTRIBUTE_UNUSED,
|
||||
int *tapfd ATTRIBUTE_UNUSED,
|
||||
unsigned int flags ATTRIBUTE_UNUSED)
|
||||
unsigned int flags)
|
||||
{
|
||||
virCheckFlags(0, -1);
|
||||
virReportSystemError(ENOSYS, "%s",
|
||||
_("Unable to create TAP devices on this platform"));
|
||||
return -1;
|
||||
|
@ -99,7 +99,7 @@ mymain(void)
|
||||
int ret = 0;
|
||||
|
||||
if ((caps = testLXCCapsInit()) == NULL)
|
||||
return (EXIT_FAILURE);
|
||||
return EXIT_FAILURE;
|
||||
|
||||
# define DO_TEST_FULL(name, is_different, inactive) \
|
||||
do { \
|
||||
@ -124,7 +124,7 @@ mymain(void)
|
||||
|
||||
virCapabilitiesFree(caps);
|
||||
|
||||
return (ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
VIRT_TEST_MAIN(mymain)
|
||||
|
Loading…
x
Reference in New Issue
Block a user