From c529f03691795a7fff7b8d7a54fe64dc722f7012 Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 21 Oct 1995 08:51:01 +0000 Subject: Return early in printreg() when the pointer is NULL. For FreeBSD, the strings describing the drive status and error bits are so deficient that the pointer is always NULL. Reported by: Philippe Charnier --- usr.bin/mt/mt.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'usr.bin/mt') diff --git a/usr.bin/mt/mt.c b/usr.bin/mt/mt.c index 2aab88b..81bdefb 100644 --- a/usr.bin/mt/mt.c +++ b/usr.bin/mt/mt.c @@ -302,6 +302,8 @@ printreg(s, v, bits) printf("%s=%o", s, v); else printf("%s=%x", s, v); + if (!bits) + return; bits++; if (v && bits) { putchar('<'); -- cgit v1.1