Module Name:    src
Committed By:   msaitoh
Date:           Thu Feb 28 05:40:58 UTC 2019

Modified Files:
        src/sys/net: if_media.c

Log Message:
- Remove extra cast.
- Cosmetic change.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/net/if_media.c

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

Modified files:

Index: src/sys/net/if_media.c
diff -u src/sys/net/if_media.c:1.37 src/sys/net/if_media.c:1.38
--- src/sys/net/if_media.c:1.37	Thu Feb 28 05:25:35 2019
+++ src/sys/net/if_media.c	Thu Feb 28 05:40:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_media.c,v 1.37 2019/02/28 05:25:35 msaitoh Exp $	*/
+/*	$NetBSD: if_media.c,v 1.38 2019/02/28 05:40:58 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.37 2019/02/28 05:25:35 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.38 2019/02/28 05:40:58 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -345,10 +345,9 @@ _ifmedia_ioctl(struct ifnet *ifp, struct
 		if (ifmr->ifm_count != 0) {
 			size_t count;
 			size_t minwords = nwords > (size_t)ifmr->ifm_count
-			    ? (size_t)ifmr->ifm_count
-			    : nwords;
-			int *kptr = (int *)malloc(minwords * sizeof(int),
-			    M_TEMP, M_WAITOK);
+			    ? (size_t)ifmr->ifm_count : nwords;
+			int *kptr = malloc(minwords * sizeof(int), M_TEMP,
+			    M_WAITOK);
 			/*
 			 * Get the media words from the interface's list.
 			 */

Reply via email to