From owner-cvs-src@FreeBSD.ORG Wed Sep 22 16:53:24 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56FB916A4CE; Wed, 22 Sep 2004 16:53:24 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D54343D4C; Wed, 22 Sep 2004 16:53:24 +0000 (GMT) (envelope-from mtm@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i8MGrOqe053284; Wed, 22 Sep 2004 16:53:24 GMT (envelope-from mtm@repoman.freebsd.org) Received: (from mtm@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i8MGrOtw053283; Wed, 22 Sep 2004 16:53:24 GMT (envelope-from mtm) Message-Id: <200409221653.i8MGrOtw053283@repoman.freebsd.org> From: Mike Makonnen Date: Wed, 22 Sep 2004 16:53:24 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libthr/thread thr_mutex.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 16:53:24 -0000 mtm 2004-09-22 16:53:24 UTC FreeBSD src repository Modified files: lib/libthr/thread thr_mutex.c Log: The SUSv3 function say that the affected functions MAY FAIL, if the specified mutex is invalid. In spec parlance 'MAY FAIL' means it's up to the implementor. So, remove the check for NULL pointers for two reasons: 1. A mutex may be invalid without necessarily being NULL. 2. If the pointer to the mutex is NULL core-dumping in the vicinity of the problem is much much much better than failing in some other part of the code (especially when the application doesn't check the return value of the function that you oh so helpfully set to EINVAL). Revision Changes Path 1.31 +6 -27 src/lib/libthr/thread/thr_mutex.c