=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/aucat/aucat.c,v retrieving revision 1.178 retrieving revision 1.179 diff -u -r1.178 -r1.179 --- src/usr.bin/aucat/aucat.c 2022/03/07 09:04:45 1.178 +++ src/usr.bin/aucat/aucat.c 2024/02/01 05:28:54 1.179 @@ -220,7 +220,7 @@ slot_new(char *path, int mode, struct aparams *par, int hdr, int cmin, int cmax, int rate, int dup, int vol, long long pos) { - struct slot *s; + struct slot *s, **ps; s = xmalloc(sizeof(struct slot)); if (!afile_open(&s->afile, path, hdr, @@ -273,8 +273,10 @@ } log_puts("\n"); } - s->next = slot_list; - slot_list = s; + for (ps = &slot_list; *ps != NULL; ps = &(*ps)->next) + ; + s->next = NULL; + *ps = s; return 1; } @@ -801,6 +803,7 @@ #endif break; } + midich--; } }