Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jul 2018 08:05:32 +0000 (UTC)
From:      Steven Hartland <smh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r336165 - head/sys/netinet
Message-ID:  <201807100805.w6A85Wg0001037@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: smh
Date: Tue Jul 10 08:05:32 2018
New Revision: 336165
URL: https://svnweb.freebsd.org/changeset/base/336165

Log:
  Removed pointless NULL check
  
  Removed pointless NULL check after malloc with M_WAITOK which can never
  return NULL.
  
  Sponsored by:	Multiplay

Modified:
  head/sys/netinet/raw_ip.c

Modified: head/sys/netinet/raw_ip.c
==============================================================================
--- head/sys/netinet/raw_ip.c	Tue Jul 10 07:29:51 2018	(r336164)
+++ head/sys/netinet/raw_ip.c	Tue Jul 10 08:05:32 2018	(r336165)
@@ -1069,8 +1069,6 @@ rip_pcblist(SYSCTL_HANDLER_ARGS)
 		return (error);
 
 	inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK);
-	if (inp_list == NULL)
-		return (ENOMEM);
 
 	INP_INFO_RLOCK_ET(&V_ripcbinfo, et);
 	for (inp = CK_LIST_FIRST(V_ripcbinfo.ipi_listhead), i = 0; inp && i < n;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807100805.w6A85Wg0001037>