Source-Changes-HG archive

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

[src/trunk]: src/sys/net - Remove extra cast.



details:   https://anonhg.NetBSD.org/src/rev/cc418d3bce2e
branches:  trunk
changeset: 449242:cc418d3bce2e
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Feb 28 05:40:58 2019 +0000

description:
- Remove extra cast.
- Cosmetic change.

diffstat:

 sys/net/if_media.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (32 lines):

diff -r b7cb5b97d055 -r cc418d3bce2e sys/net/if_media.c
--- a/sys/net/if_media.c        Thu Feb 28 05:25:35 2019 +0000
+++ b/sys/net/if_media.c        Thu Feb 28 05:40:58 2019 +0000
@@ -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 @@
                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.
                         */



Home | Main Index | Thread Index | Old Index