diff options
author | martin <martin@FreeBSD.org> | 1994-05-01 03:53:29 +0000 |
---|---|---|
committer | martin <martin@FreeBSD.org> | 1994-05-01 03:53:29 +0000 |
commit | 0dbe39ffd266d76961f06bde96ae1aca9c734080 (patch) | |
tree | d3d60e9436e0ff4ffb9500b4f75ed252e09b72c1 | |
parent | 8e1a807e1ae69fc2fb8b5e53240157a971dc24da (diff) | |
download | FreeBSD-src-0dbe39ffd266d76961f06bde96ae1aca9c734080.zip FreeBSD-src-0dbe39ffd266d76961f06bde96ae1aca9c734080.tar.gz |
Change switch statement to two if statements. This saves 208 bytes in
the object file which is enough to bring the size down to the point
where the bootstrap fits into 15 sectors.
-rw-r--r-- | sys/i386/boot/biosboot/boot.c | 16 | ||||
-rw-r--r-- | sys/i386/boot/boot.c | 16 |
2 files changed, 12 insertions, 20 deletions
diff --git a/sys/i386/boot/biosboot/boot.c b/sys/i386/boot/biosboot/boot.c index e9d58cd..50f39df 100644 --- a/sys/i386/boot/biosboot/boot.c +++ b/sys/i386/boot/biosboot/boot.c @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: Mach, [92/04/03 16:51:14 rvb] - * $Id: boot.c,v 1.9 1994/02/22 22:59:38 rgrimes Exp $ + * $Id: boot.c,v 1.10 1994/04/20 22:06:24 phk Exp $ */ @@ -76,7 +76,7 @@ int drive; ouraddr, argv[7] = memsize(0), argv[8] = memsize(1), - "$Revision: 1.9 $"); + "$Revision: 1.10 $"); printf("use hd(1,a)/386bsd to boot sd0 when wd0 is also installed\n"); gateA20(); loadstart: @@ -243,14 +243,10 @@ loadprog(howto) printf("Press 'A', 'B' or any other key for the default "); printf("%c: ", unit+'A'); i = getchar(); - switch (i) { - case '0': case 'A': case 'a': - unit = 0; - break; - case '1': case 'B': case 'b': - unit = 1; - break; - } + if (i=='0' || i=='A' || i=='a') + unit = 0; + if (i=='1' || i=='B' || i=='b') + unit = 1; printf("\n"); break; case 4: diff --git a/sys/i386/boot/boot.c b/sys/i386/boot/boot.c index e9d58cd..50f39df 100644 --- a/sys/i386/boot/boot.c +++ b/sys/i386/boot/boot.c @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: Mach, [92/04/03 16:51:14 rvb] - * $Id: boot.c,v 1.9 1994/02/22 22:59:38 rgrimes Exp $ + * $Id: boot.c,v 1.10 1994/04/20 22:06:24 phk Exp $ */ @@ -76,7 +76,7 @@ int drive; ouraddr, argv[7] = memsize(0), argv[8] = memsize(1), - "$Revision: 1.9 $"); + "$Revision: 1.10 $"); printf("use hd(1,a)/386bsd to boot sd0 when wd0 is also installed\n"); gateA20(); loadstart: @@ -243,14 +243,10 @@ loadprog(howto) printf("Press 'A', 'B' or any other key for the default "); printf("%c: ", unit+'A'); i = getchar(); - switch (i) { - case '0': case 'A': case 'a': - unit = 0; - break; - case '1': case 'B': case 'b': - unit = 1; - break; - } + if (i=='0' || i=='A' || i=='a') + unit = 0; + if (i=='1' || i=='B' || i=='b') + unit = 1; printf("\n"); break; case 4: |