Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys add a cast to (struct statvfs *) for STATVFSBUF_GET(...



details:   https://anonhg.NetBSD.org/src/rev/94d9faad575a
branches:  trunk
changeset: 935491:94d9faad575a
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Fri Jul 03 19:37:27 2020 +0000

description:
add a cast to (struct statvfs *) for STATVFSBUF_GET() to make sure it's
never assigned to anything else

diffstat:

 sys/sys/statvfs.h |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 5b86fc4b28a6 -r 94d9faad575a sys/sys/statvfs.h
--- a/sys/sys/statvfs.h Fri Jul 03 19:29:25 2020 +0000
+++ b/sys/sys/statvfs.h Fri Jul 03 19:37:27 2020 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index