CVS commit: src/games/sail
Module Name:src Committed By: nia Date: Fri Oct 29 11:42:34 UTC 2021 Modified Files: src/games/sail: array.c Log Message: sail(6): convert realloc(x * y) to reallocarr To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/games/sail/array.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/sail/array.c diff -u src/games/sail/array.c:1.1 src/games/sail/array.c:1.2 --- src/games/sail/array.c:1.1 Sun Mar 15 03:33:56 2009 +++ src/games/sail/array.c Fri Oct 29 11:42:34 2021 @@ -73,18 +73,14 @@ int array_setsize(struct array *a, unsigned num) { unsigned newmax; - void **newptr; if (num > a->max) { newmax = a->max; while (num > newmax) { newmax = newmax ? newmax*2 : 4; } - newptr = realloc(a->v, newmax*sizeof(*a->v)); - if (newptr == NULL) { + if (reallocarr(>v, newmax, sizeof(*a->v)) != 0) return -1; - } - a->v = newptr; a->max = newmax; } a->num = num;
CVS commit: src/games/sail
Module Name:src Committed By: nia Date: Fri Oct 29 11:42:34 UTC 2021 Modified Files: src/games/sail: array.c Log Message: sail(6): convert realloc(x * y) to reallocarr To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/games/sail/array.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/games/sail
On Fri, Mar 28, 2014 at 05:53:47PM +, Alan Barrett wrote: Modified Files: src/games/sail: dr_2.c Log Message: temp is a pointer, and tempmax, not sizeof(temp), is the length of the buffer that it points to. Adjust a strlcat() call to suit. Oops, apparently my fault... -- David A. Holland dholl...@netbsd.org
Re: CVS commit: src/games/sail
On Thu, Aug 25, 2011 at 12:18:29PM -0400, Christos Zoulas wrote: Modified Files: src/games/sail: pl_7.c Log Message: add printf attributes. please use __printflike() instead of __attribute__(__format__)... -- David A. Holland dholl...@netbsd.org
CVS commit: src/games/sail
Module Name:src Committed By: wiz Date: Sun Jan 17 22:56:32 UTC 2010 Modified Files: src/games/sail: lo_main.c Log Message: Close file when finished with it. Found by cppcheck. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/games/sail/lo_main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.