From ade6841fe59e18103a23837f4834a13d504219dd Mon Sep 17 00:00:00 2001 From: pooka Date: Fri, 9 Apr 2004 16:41:23 +0000 Subject: [PATCH] If argv[1] doesn't exist, don't try to use it. --- sys/arch/sgimips/sgimips/machdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arch/sgimips/sgimips/machdep.c b/sys/arch/sgimips/sgimips/machdep.c index 086925120eee..e9efa689f4bd 100644 --- a/sys/arch/sgimips/sgimips/machdep.c +++ b/sys/arch/sgimips/sgimips/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.82 2004/04/05 16:01:43 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.83 2004/04/09 16:41:23 pooka Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.82 2004/04/05 16:01:43 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.83 2004/04/09 16:41:23 pooka Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -275,7 +275,7 @@ mach_init(int argc, char **argv, int magic, struct btinfo_common *btinfo) * If argv[1] isn't an environment string, try to use it to set the * boot device. */ - if (strchr(argv[1], '=') != 0) + if (argc > 1 && strchr(argv[1], '=') != 0) makebootdev(argv[1]); boothowto = RB_SINGLE;