From owner-cvs-lib Fri Jun 27 21:23:34 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id VAA03871 for cvs-lib-outgoing; Fri, 27 Jun 1997 21:23:34 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id VAA03796; Fri, 27 Jun 1997 21:21:20 -0700 (PDT) From: Peter Wemm Received: (from peter@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id VAA16441; Fri, 27 Jun 1997 21:19:53 -0700 (PDT) Date: Fri, 27 Jun 1997 21:19:53 -0700 (PDT) Message-Id: <199706280419.VAA16441@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-lib@FreeBSD.ORG Subject: cvs commit: src/lib/libc/net res_send.c Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk peter 1997/06/27 21:19:53 PDT Modified files: lib/libc/net res_send.c Log: replace the OpenBSD fd_set sizing code with something more efficient. Only call malloc() if the fd is too big for the compiled in fd_set size, and don't use calloc either. This should reduce the impact of conflicts with private malloc implementations etc. When using the fd_set on the stack, only zero what is needed rather than all 1024 bits like FD_ZERO did. Revision Changes Path 1.18 +16 -9 src/lib/libc/net/res_send.c