From owner-svn-src-all@FreeBSD.ORG Tue Sep 24 17:09:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5720A9F1; Tue, 24 Sep 2013 17:09:29 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4485C2B3A; Tue, 24 Sep 2013 17:09:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8OH9TB3017608; Tue, 24 Sep 2013 17:09:29 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8OH9Tr7017606; Tue, 24 Sep 2013 17:09:29 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201309241709.r8OH9Tr7017606@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 24 Sep 2013 17:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255856 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 17:09:29 -0000 Author: jh Date: Tue Sep 24 17:09:28 2013 New Revision: 255856 URL: http://svnweb.freebsd.org/changeset/base/255856 Log: MFC r250706: A library function shall not set errno to 0. Modified: stable/9/sys/kern/subr_sbuf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_sbuf.c ============================================================================== --- stable/9/sys/kern/subr_sbuf.c Tue Sep 24 17:01:29 2013 (r255855) +++ stable/9/sys/kern/subr_sbuf.c Tue Sep 24 17:09:28 2013 (r255856) @@ -706,9 +706,10 @@ sbuf_finish(struct sbuf *s) #ifdef _KERNEL return (s->s_error); #else - errno = s->s_error; - if (s->s_error) + if (s->s_error != 0) { + errno = s->s_error; return (-1); + } return (0); #endif }