From 49f544b57243bf3fafbeabfcab5bdd1294d9d8f3 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sat, 21 Oct 1995 08:51:01 +0000 Subject: [PATCH] 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(+) diff --git a/usr.bin/mt/mt.c b/usr.bin/mt/mt.c index 2aab88be7129..81bdefb90d1a 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('<');