From owner-cvs-all@FreeBSD.ORG Fri Aug 8 12:03:38 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A738937B401; Fri, 8 Aug 2003 12:03:38 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5420D43FCB; Fri, 8 Aug 2003 12:03:38 -0700 (PDT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h78J3c0U026874; Fri, 8 Aug 2003 12:03:38 -0700 (PDT) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h78J3cUM026873; Fri, 8 Aug 2003 12:03:38 -0700 (PDT) Message-Id: <200308081903.h78J3cUM026873@repoman.freebsd.org> From: Marcel Moolenaar Date: Fri, 8 Aug 2003 12:03:38 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libc/uuid uuid_compare.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2003 19:03:39 -0000 marcel 2003/08/08 12:03:37 PDT FreeBSD src repository Modified files: lib/libc/uuid uuid_compare.c Log: Fix two (2) bugs in one (1) statement: o fix the len argument of memcmp(3) to be the size of the node field of the uuid structure, not the size of the uuid structure itself. We're comparing the node fields... o uuid_compare(3) is specified to return -1, 0 or 1, depending on the outcome of the comparison. memcmp(3) returns the difference between the first differing bytes. Hence, we cannot ever return the return value of memcmp(3) as-is. PR: standards/55370 Submitted by: Konstantin Oznobihin Revision Changes Path 1.2 +4 -1 src/lib/libc/uuid/uuid_compare.c