From owner-freebsd-bugs Tue Feb 20 11:19:30 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id LAA00306 for bugs-outgoing; Tue, 20 Feb 1996 11:19:30 -0800 (PST) Received: from nervosa.com (root@nervosa.com [192.187.228.86]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id LAA00301 for ; Tue, 20 Feb 1996 11:19:27 -0800 (PST) Received: from nervosa.com (coredump@onyx.nervosa.com [10.0.0.1]) by nervosa.com (8.7.3/nervosa.com.2) with SMTP id LAA03497; Tue, 20 Feb 1996 11:18:36 -0800 (PST) Date: Tue, 20 Feb 1996 11:18:36 -0800 (PST) From: invalid opcode To: Lapinsky Alexander cc: bugs@FreeBSD.ORG Subject: Re: /usr/bin/mt core dumped In-Reply-To: <199602201558.SAA27041@flox.kiam1.rssi.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-bugs@FreeBSD.ORG Precedence: bulk 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 ==