Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc/stand/boot Don't use dynamically sized unions...



details:   https://anonhg.NetBSD.org/src/rev/bc215e8b0a84
branches:  trunk
changeset: 341888:bc215e8b0a84
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Nov 27 16:52:32 2015 +0000

description:
Don't use dynamically sized unions, they are a horrible GNUism. Just use
the existing upper limit all the time.

diffstat:

 sys/arch/sparc/stand/boot/boot.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 50436deddc70 -r bc215e8b0a84 sys/arch/sparc/stand/boot/boot.c
--- a/sys/arch/sparc/stand/boot/boot.c  Fri Nov 27 15:10:32 2015 +0000
+++ b/sys/arch/sparc/stand/boot/boot.c  Fri Nov 27 16:52:32 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boot.c,v 1.28 2012/05/28 19:24:29 martin Exp $ */
+/*     $NetBSD: boot.c,v 1.29 2015/11/27 16:52:32 joerg Exp $ */
 
 /*-
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -348,7 +348,7 @@
        if (i < BOOTINFO_SIZE / 2) {
                union {
                        struct btinfo_kernelfile bi_file;
-                       char x[i];
+                       char x[BOOTINFO_SIZE / 2];
                } U;
                strcpy(U.bi_file.name, kernel);
                bi_add(&U.bi_file, BTINFO_KERNELFILE, i);



Home | Main Index | Thread Index | Old Index