]> xenbits.xensource.com Git - people/vhanquez/xen-unstable.git/commitdiff
libxl: fix typos in libxl_cpuid_parse_config
authorOlaf Hering <olaf@aepfle.de>
Fri, 1 Jun 2012 11:06:22 +0000 (12:06 +0100)
committerOlaf Hering <olaf@aepfle.de>
Fri, 1 Jun 2012 11:06:22 +0000 (12:06 +0100)
Fix typo in comment.
Fix cpuid_flags array init, use correct number of arguments for empty
array entry.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_cpuid.c

index ff7531f0cc035dff3f18e666be4a75214ddcec90..d17fdd670aa1441662ee41badfcf2791a438e2ed 100644 (file)
@@ -185,7 +185,7 @@ int libxl_cpuid_parse_config(libxl_cpuid_policy_list *cpuid, const char* str)
         {"svm_decode",   0x8000000a, NA, CPUID_REG_EDX,  7,  1},
         {"svm_pausefilt",0x8000000a, NA, CPUID_REG_EDX, 10,  1},
 
-        {NULL, 0, CPUID_REG_INV, 0, 0}
+        {NULL, 0, NA, CPUID_REG_INV, 0, 0}
     };
 #undef NA
     char *sep, *val, *endptr;
@@ -216,7 +216,7 @@ int libxl_cpuid_parse_config(libxl_cpuid_policy_list *cpuid, const char* str)
     num = strtoull(val, &endptr, 0);
     flags[flag->length] = 0;
     if (endptr != val) {
-        /* is this was a valid number, write the binary form into the string */
+        /* if this was a valid number, write the binary form into the string */
         for (i = 0; i < flag->length; i++) {
             flags[flag->length - 1 - i] = "01"[!!(num & (1 << i))];
         }