Re: [PATCH 1/4] Improve netlink to support all protocol.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi ~

On 08/21/2012 11:04 PM, Doug Goldstein wrote:
+    virNetlinkHandle *nlhandle = NULL;
+
+    if (protocol>= MAX_LINKS) {
+        virReportSystemError(EINVAL,
+                             _("invalid protocol argument: %d"), protocol);
+        return -EINVAL;
+    }
+
+    if (groups>= 32) {
I believe there is a define for this in the headers so it would be
better to use that then hardcoding a number without any code comments
to what it means. If there's not a define, I would at least document
what the 32 is and where it derives from the kernel code so that if
things change in the future it will be easier to fix.
And also, it was my mistake to have a little misunderstanding about this argument. "groups" should be a mask representing the groups to join in. So this check is obviously wrong.

Thanks for the comments. :)




--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]