aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMartin Renters <martin@FreeBSD.org>1994-05-01 03:53:29 +0000
committerMartin Renters <martin@FreeBSD.org>1994-05-01 03:53:29 +0000
commit0eb0343191c69ae62ef41dc562ae11cfd16ebe42 (patch)
treed3d60e9436e0ff4ffb9500b4f75ed252e09b72c1 /sys
parent698a2ca9f2f9d378ce241c7443e4ce43c594997d (diff)
downloadsrc-0eb0343191c69ae62ef41dc562ae11cfd16ebe42.tar.gz
src-0eb0343191c69ae62ef41dc562ae11cfd16ebe42.zip
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.
Notes
Notes: svn path=/head/; revision=1438
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/boot/biosboot/boot.c16
-rw-r--r--sys/i386/boot/boot.c16
2 files changed, 12 insertions, 20 deletions
diff --git a/sys/i386/boot/biosboot/boot.c b/sys/i386/boot/biosboot/boot.c
index e9d58cdf13b4..50f39dfe7101 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 e9d58cdf13b4..50f39dfe7101 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: