chiark / gitweb /
util: make string static
authorLennart Poettering <lennart@poettering.net>
Mon, 21 Feb 2011 23:19:03 +0000 (00:19 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 21 Feb 2011 23:19:03 +0000 (00:19 +0100)
src/detect-virt.c
src/util.c

index 7685d18..57f0176 100644 (file)
@@ -40,7 +40,7 @@ int main(int argc, char *argv[]) {
         }
 
         if (r > 0)
         }
 
         if (r > 0)
-                printf("%s\n", id);
+                puts(id);
 
         return r == 0;
 }
 
         return r == 0;
 }
index 7e8246b..aa49390 100644 (file)
@@ -3719,7 +3719,7 @@ int detect_vm(const char **id) {
                 "/sys/class/dmi/id/bios_vendor"
         };
 
                 "/sys/class/dmi/id/bios_vendor"
         };
 
-        const char dmi_vendor_table[] =
+        static const char dmi_vendor_table[] =
                 "QEMU\0"                  "qemu\0"
                 /* http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1009458 */
                 "VMware\0"                "vmware\0"
                 "QEMU\0"                  "qemu\0"
                 /* http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1009458 */
                 "VMware\0"                "vmware\0"
@@ -3729,7 +3729,7 @@ int detect_vm(const char **id) {
                 "Xen\0"                   "xen\0"
                 "\0";
 
                 "Xen\0"                   "xen\0"
                 "\0";
 
-        const char cpuid_vendor_table[] =
+        static const char cpuid_vendor_table[] =
                 "XenVMMXenVMM\0"          "xen\0"
                 "KVMKVMKVM\0"             "kvm\0"
                 /* http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1009458 */
                 "XenVMMXenVMM\0"          "xen\0"
                 "KVMKVMKVM\0"             "kvm\0"
                 /* http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1009458 */