summary refs log tree commit diff stats
path: root/hw/acpi.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-27 22:16:47 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-27 22:16:47 +0000
commit54042bcf24b6c7c1c99f7a022f3cd00ba338f708 (patch)
tree4280b532a0261f13058153ecf3be557e2b625f77 /hw/acpi.c
parent0858532ea93e0890bf13556f4ef3dc25d7636233 (diff)
downloadfocaccia-qemu-54042bcf24b6c7c1c99f7a022f3cd00ba338f708.tar.gz
focaccia-qemu-54042bcf24b6c7c1c99f7a022f3cd00ba338f708.zip
Remove some warnings and fix windows build.
Initialize some variables to make GCC happy and switch from using index to
strchr.  index is not available on Windows.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6653 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/acpi.c')
-rw-r--r--hw/acpi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/acpi.c b/hw/acpi.c
index 52bc43ad58..52f50a0814 100644
--- a/hw/acpi.c
+++ b/hw/acpi.c
@@ -841,7 +841,7 @@ int acpi_table_add(const char *t)
     f = buf;
     while (buf[0]) {
         struct stat s;
-        char *n = index(f, ':');
+        char *n = strchr(f, ':');
         if (n)
             *n = '\0';
         if(stat(f, &s) < 0) {
@@ -873,7 +873,7 @@ int acpi_table_add(const char *t)
     while (buf[0]) {
         struct stat s;
         int fd;
-        char *n = index(f, ':');
+        char *n = strchr(f, ':');
         if (n)
             *n = '\0';
         fd = open(f, O_RDONLY);