diff --git a/hw/acpi.c b/hw/acpi.c index 52bc43ad58fbf852925ed4794cb80ac08f2c1def..52f50a08141978f1bcbd9ce8c1ee38fee5faef14 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); diff --git a/vl.c b/vl.c index 8e59cd8d7437a1180523a6638bee32eb58af31ce..1d96a313db15a1391dac2add4197eb2216d5aa08 100644 --- a/vl.c +++ b/vl.c @@ -4641,8 +4641,8 @@ int main(int argc, char **argv, char **envp) const char *pid_file = NULL; int autostart; const char *incoming = NULL; - int fd; - struct passwd *pwd; + int fd = 0; + struct passwd *pwd = NULL; const char *chroot_dir = NULL; const char *run_as = NULL;