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/b4415ff53c75
branches:  trunk
changeset: 973547:b4415ff53c75
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 7e07fddea8c7 -r b4415ff53c75 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