From owner-cvs-src@FreeBSD.ORG Thu Apr 5 02:07:33 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B827B16A404; Thu, 5 Apr 2007 02:07:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 9446413C458; Thu, 5 Apr 2007 02:07:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l3527XlP048163; Thu, 5 Apr 2007 02:07:33 GMT (envelope-from delphij@repoman.freebsd.org) Received: (from delphij@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l3527XQK048162; Thu, 5 Apr 2007 02:07:33 GMT (envelope-from delphij) Message-Id: <200704050207.l3527XQK048162@repoman.freebsd.org> From: Xin LI Date: Thu, 5 Apr 2007 02:07:33 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libc/uuid uuid_compare.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 05 Apr 2007 02:07:33 -0000 delphij 2007-04-05 02:07:33 UTC FreeBSD src repository Modified files: lib/libc/uuid uuid_compare.c Log: Avoid using intermediate variables by just comparing between two values, the latter does not tend to have sign extension and/or overflow bugs, and makes the code more obvious. While I'm there, make use of a macro which is derived from bin/ps/ps.c: ps_compat() to improve the readability of the code. Suggested by: bde MFC after: 1 week Revision Changes Path 1.6 +15 -27 src/lib/libc/uuid/uuid_compare.c