Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Sep 2013 17:09:29 +0000 (UTC)
From:      Jaakko Heinonen <jh@FreeBSD.org>
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
Message-ID:  <201309241709.r8OH9Tr7017606@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309241709.r8OH9Tr7017606>