Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jul 2010 00:29:04 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        hackers@freebsd.org
Subject:   [PATCH] Use _SIG_VALID macro in ddb/db_command.c
Message-ID:  <AANLkTikqOWgfz6oDnJD09rZtMfLnLb3k-bLypHnqOo4Y@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Spotted this really minor item that I figured could be converted over
to _SIG_VALID in ddb:

Index: ddb/db_command.c
===================================================================
--- ddb/db_command.c	(revision 206173)
+++ ddb/db_command.c	(working copy)
@@ -633,7 +633,7 @@
 	if (!db_expression(&pid))
 		DB_ERROR(("Missing process ID\n"));
 	db_skip_to_eol();
-	if (sig < 1 || sig > _SIG_MAXSIG)
+	if (!_SIG_VALID(sig))
 		DB_ERROR(("Signal number out of range\n"));

 	/*

considering that the above range and _SIG_VALID are complementing checks.

Thanks,
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikqOWgfz6oDnJD09rZtMfLnLb3k-bLypHnqOo4Y>