Module Name: src
Committed By: jdolecek
Date: Fri Jul 3 19:37:28 UTC 2020
Modified Files:
src/sys/sys: statvfs.h
Log Message:
add a cast to (struct statvfs *) for STATVFSBUF_GET() to make sure it's
never assigned to anything else
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/sys/statvfs.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/statvfs.h
diff -u src/sys/sys/statvfs.h:1.20 src/sys/sys/statvfs.h:1.21
--- src/sys/sys/statvfs.h:1.20 Sat May 16 18:31:53 2020
+++ src/sys/sys/statvfs.h Fri Jul 3 19:37:27 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: statvfs.h,v 1.20 2020/05/16 18:31:53 christos Exp $ */
+/* $NetBSD: statvfs.h,v 1.21 2020/07/03 19:37:27 jdolecek Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -150,7 +150,8 @@ void copy_statvfs_info(struct statvfs *,
int dostatvfs(struct mount *, struct statvfs *, struct lwp *, int, int);
#include <sys/kmem.h>
-#define STATVFSBUF_GET() kmem_zalloc(sizeof(struct statvfs), KM_SLEEP)
+#define STATVFSBUF_GET() \
+ (struct statvfs *)kmem_zalloc(sizeof(struct statvfs), KM_SLEEP)
#define STATVFSBUF_PUT(sb) kmem_free(sb, sizeof(struct statvfs))
#else