Date: Tue, 20 Feb 1996 11:18:36 -0800 (PST) From: invalid opcode <coredump@nervosa.com> To: Lapinsky Alexander <avl@kiam1.rssi.ru> Cc: bugs@FreeBSD.ORG Subject: Re: /usr/bin/mt core dumped Message-ID: <Pine.BSF.3.91.960220111735.1181S-100000@nervosa.com> In-Reply-To: <199602201558.SAA27041@flox.kiam1.rssi.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 20 Feb 1996, Lapinsky Alexander wrote: > Some times mt utility "core dumped" (it is right, for example, > for Archive/Wangtek QIC-02 tape controller). > Small changes (see below) corrects this trouble > (move in source code 1 line down -- quite simple :-). > > *** /cdrom/usr/src/usr.bin/mt/mt.c Fri Aug 25 22:45:34 1995 > --- mt.c Fri Feb 16 17:15:34 1996 > *************** > *** 302,309 **** > printf("%s=%o", s, v); > else > printf("%s=%x", s, v); > - bits++; > if (v && bits) { > putchar('<'); > while (i = *bits++) { > if (v & (1 << (i-1))) { > --- 302,309 ---- > printf("%s=%o", s, v); > else > printf("%s=%x", s, v); > if (v && bits) { > + bits++; > putchar('<'); > while (i = *bits++) { > if (v & (1 << (i-1))) { > ****************************** cut here **************************** > It looks as you are itterating the actual pointer, and not the contents of the pointer, also, if what you intended was *bits++, look down lower, it's in the while loop. == Chris Layne ============================================================== == coredump@nervosa.com ================= http://www.nervosa.com/~coredump ==
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960220111735.1181S-100000>