Sun Feb 12 18:21:50 2017 UTC ()
Uninitialized var, found by Mootja; not tested, but obvious enough.


(maxv)
diff -r1.5 -r1.6 src/sys/arch/amiga/stand/bootblock/installboot/installboot.c

cvs diff -r1.5 -r1.6 src/sys/arch/amiga/stand/bootblock/installboot/Attic/installboot.c (expand / switch to unified diff)

--- src/sys/arch/amiga/stand/bootblock/installboot/Attic/installboot.c 2010/07/06 06:09:57 1.5
+++ src/sys/arch/amiga/stand/bootblock/installboot/Attic/installboot.c 2017/02/12 18:21:50 1.6
@@ -1,33 +1,33 @@ @@ -1,33 +1,33 @@
1/* $NetBSD: installboot.c,v 1.5 2010/07/06 06:09:57 mrg Exp $ */ 1/* $NetBSD: installboot.c,v 1.6 2017/02/12 18:21:50 maxv Exp $ */
2 2
3#include <err.h> 3#include <err.h>
4#include <fcntl.h> 4#include <fcntl.h>
5#include <stdio.h> 5#include <stdio.h>
6#include <stdlib.h> 6#include <stdlib.h>
7#include <string.h> 7#include <string.h>
8#include <unistd.h> 8#include <unistd.h>
9 9
10#include "../elf2bb/chksum.h" 10#include "../elf2bb/chksum.h"
11 11
12/* XXX Must be kept in sync with bbstart.s! */ 12/* XXX Must be kept in sync with bbstart.s! */
13#define CMDLN_LOC 0x10 13#define CMDLN_LOC 0x10
14#define CMDLN_LEN 0x20 14#define CMDLN_LEN 0x20
15 15
16int main(int argc, char *argv[]); 16int main(int argc, char *argv[]);
17 17
18int main(int argc, char *argv[]){ 18int main(int argc, char *argv[]){
19 19
20 char *line; 20 char *line = NULL;
21 char *progname; 21 char *progname;
22 char *bootnam, *devnam; 22 char *bootnam, *devnam;
23 char *dline; 23 char *dline;
24 int bootfd, devfd; 24 int bootfd, devfd;
25 int rc; /* read, write */ 25 int rc; /* read, write */
26 int c; /* getopt */ 26 int c; /* getopt */
27 int sumlen; 27 int sumlen;
28 u_int32_t sum2, sum16; 28 u_int32_t sum2, sum16;
29  29
30 u_int32_t block[128*16]; 30 u_int32_t block[128*16];
31 31
32 progname = argv[0]; 32 progname = argv[0];
33 while ((c = getopt(argc, argv, "l:")) != -1) { 33 while ((c = getopt(argc, argv, "l:")) != -1) {