diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-09-14 23:04:28 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-09-14 23:04:28 +0000 |
commit | 2f0e3749ca723d118ec079fd20f4f10fa5ee84e4 (patch) | |
tree | 81a7e2151a434398a9819eb3e5342371d1ccd0e0 /usr.bin/diff | |
parent | a69cf7d124c83d9867692956f44f04560483f2b4 (diff) |
use sizeof(struct cand) instead of defining an unused cand object, and
then doing sizeof(cand). silly kids
Diffstat (limited to 'usr.bin/diff')
-rw-r--r-- | usr.bin/diff/diffreg.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index cccd4305353..374de9047d3 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diffreg.c,v 1.57 2004/06/20 18:47:45 otto Exp $ */ +/* $OpenBSD: diffreg.c,v 1.58 2004/09/14 23:04:27 deraadt Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -65,7 +65,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.57 2004/06/20 18:47:45 otto Exp $"; +static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.58 2004/09/14 23:04:27 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -156,7 +156,7 @@ struct cand { int x; int y; int pred; -} cand; +}; struct line { int serial; @@ -423,7 +423,7 @@ diffreg(char *ofile1, char *ofile2, int flags) klist = emalloc((slen[0] + 2) * sizeof(int)); clen = 0; clistlen = 100; - clist = emalloc(clistlen * sizeof(cand)); + clist = emalloc(clistlen * sizeof(struct cand)); i = stone(class, slen[0], member, klist); free(member); free(class); @@ -688,7 +688,7 @@ newcand(int x, int y, int pred) if (clen == clistlen) { clistlen = clistlen * 11 / 10; - clist = erealloc(clist, clistlen * sizeof(cand)); + clist = erealloc(clist, clistlen * sizeof(struct cand)); } q = clist + clen; q->x = x; |