Bug#347695: Patch to fix bug

2006-02-03 Thread Jan Niehusmann
Oops, sorry, I missed the important point you made: On Fri, Feb 03, 2006 at 04:52:12PM -0500, Justin Pryzby wrote: > which also doesnn't modify j (unless you intended that j=nsize). No, you are right, j probably should not be modified. If I understand the code correctly, setting j (and therefore

Bug#347695: Patch to fix bug

2006-02-03 Thread Jan Niehusmann
On Fri, Feb 03, 2006 at 04:52:12PM -0500, Justin Pryzby wrote: > On Fri, Feb 03, 2006 at 10:41:40PM +0100, Jan Niehusmann wrote: > > + for (; j > +nlist[j] = 0; > Why not: > memset(nlist+j, 0, (nsize-j)*sizeof(*nlist)); Should work as well, but is harder to read (IMHO). BTW, look at line 5

Bug#347695: Patch to fix bug

2006-02-03 Thread Justin Pryzby
On Fri, Feb 03, 2006 at 10:41:40PM +0100, Jan Niehusmann wrote: > The reported behaviour is caused by an array not completely initialized > by realloc_jobs_list. The following patch fixes the bug: > > --- jobs.c.orig 2006-02-03 22:27:07.0 +0100 > +++ jobs.c2006-02-03 22:27:58.000

Bug#347695: Patch to fix bug

2006-02-03 Thread Jan Niehusmann
The reported behaviour is caused by an array not completely initialized by realloc_jobs_list. The following patch fixes the bug: --- jobs.c.orig 2006-02-03 22:27:07.0 +0100 +++ jobs.c 2006-02-03 22:27:58.0 +0100 @@ -858,6 +858,9 @@ for (i = j = 0; i < js.j_jobslots; i++)