On Tue, Nov 04, 2014 at 01:57:52AM +0000, Chen, Fan wrote:
On Mon, 2014-11-03 at 14:18 +0100, Martin Kletzander wrote:On Thu, Oct 30, 2014 at 01:44:18PM +0800, Chen Fan wrote: >diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c >index bff3b0f..7218747 100644 >--- a/tests/qemuxml2argvmock.c >+++ b/tests/qemuxml2argvmock.c >@@ -21,6 +21,7 @@ > #include <config.h> > > #include "internal.h" >+#include "virnuma.h" > #include <time.h> > > time_t time(time_t *t) >@@ -30,3 +31,11 @@ time_t time(time_t *t) > *t = ret; > return ret; > } >+ >+int >+virNumaGetMaxNode(void) >+{ >+ const int maxnodesNum = 7; >+ >+ return maxnodesNum; >+} Why not just "return 7;" ???I just think magic number may be not proper.
Probably a matter of taste, I'd use a comment in that case, but proper compiler should optimize it even without that const, so no problem here ;) Martin
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list