[PATCH] Use _SIG_VALID macro in ddb/db_command.c

Garrett Cooper yanegomi at gmail.com
Mon Jul 12 07:29:06 UTC 2010


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


More information about the freebsd-hackers mailing list