Thu May 28 15:21:26 2009 UTC ()
Redo previous, by simply updating basep earlier, before label.


(njoly)
diff -r1.34 -r1.35 src/sys/compat/osf1/osf1_file.c

cvs diff -r1.34 -r1.35 src/sys/compat/osf1/Attic/osf1_file.c (expand / switch to context diff)
--- src/sys/compat/osf1/Attic/osf1_file.c 2009/05/28 14:48:20 1.34
+++ src/sys/compat/osf1/Attic/osf1_file.c 2009/05/28 15:21:26 1.35
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_file.c,v 1.34 2009/05/28 14:48:20 njoly Exp $ */
+/* $NetBSD: osf1_file.c,v 1.35 2009/05/28 15:21:26 njoly Exp $ */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.34 2009/05/28 14:48:20 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.35 2009/05/28 15:21:26 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_syscall_debug.h"
@@ -243,10 +243,10 @@
 	if (cookiebuf)
 		free(cookiebuf, M_TEMP);
 	free(buf, M_TEMP);
+	if (SCARG(uap, basep) != NULL)
+		error = copyout(&eofflag, SCARG(uap, basep), sizeof(long));
 out1:
 	fd_putfile(fd);
-	if (error == 0 && SCARG(uap, basep) != NULL)
-		error = copyout(&eofflag, SCARG(uap, basep), sizeof(long));
 	return error;
 }