Module Name:    src
Committed By:   riastradh
Date:           Fri Nov 24 16:35:51 UTC 2023

Modified Files:
        src/tests/kernel: t_rnd.c

Log Message:
t_rnd: Fix misuse of RZ.

Not likely to matter, but in the unlikely event that rump_sys_close
fails, it will return -1 and set errno as RL expects, not return the
error code as RZ expects.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/kernel/t_rnd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/kernel/t_rnd.c
diff -u src/tests/kernel/t_rnd.c:1.11 src/tests/kernel/t_rnd.c:1.12
--- src/tests/kernel/t_rnd.c:1.11	Sun Apr 16 18:24:23 2017
+++ src/tests/kernel/t_rnd.c	Fri Nov 24 16:35:51 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_rnd.c,v 1.11 2017/04/16 18:24:23 riastradh Exp $	*/
+/*	$NetBSD: t_rnd.c,v 1.12 2023/11/24 16:35:51 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_rnd.c,v 1.11 2017/04/16 18:24:23 riastradh Exp $");
+__RCSID("$NetBSD: t_rnd.c,v 1.12 2023/11/24 16:35:51 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/fcntl.h>
@@ -106,7 +106,7 @@ ATF_TC_BODY(read_random, tc)
 		alarm(2);
 		RL(fd = rump_sys_open("/dev/random", RUMP_O_RDONLY));
 		RL(rump_sys_read(fd, buf, sizeof(buf)));
-		RZ(rump_sys_close(fd));
+		RL(rump_sys_close(fd));
 	}
 }
 

Reply via email to