From 0ac29b0bcabedbacd0b33dab6065a8873397756b Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 3 Apr 2007 03:58:58 +0000 Subject: [PATCH] Don't return error message for syserr_unknown. --- v7/src/microcode/uxtop.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/v7/src/microcode/uxtop.c b/v7/src/microcode/uxtop.c index ccdd90e9d..49436949d 100644 --- a/v7/src/microcode/uxtop.c +++ b/v7/src/microcode/uxtop.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: uxtop.c,v 1.34 2007/01/12 03:45:55 cph Exp $ +$Id: uxtop.c,v 1.35 2007/04/03 03:58:58 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -303,7 +303,10 @@ DEFUN (syserr_to_error_code, (syserr), enum syserr_names syserr) CONST char * DEFUN (OS_error_code_to_message, (syserr), unsigned int syserr) { - return (strerror (syserr_to_error_code ((enum syserr_names) syserr))); + return + ((syserr == 0) + ? 0 + : (strerror (syserr_to_error_code ((enum syserr_names) syserr)))); } #else /* not HAVE_STRERROR */ -- 2.25.1