Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jan 1998 14:27:37 -0700 (MST)
From:      Brandon Gillespie <brandon@roguetrader.com>
To:        hackers@FreeBSD.ORG
Subject:   /usr/include/sys/types.h FD_ZERO/FD_COPY macros
Message-ID:  <Pine.BSF.3.96.980115142455.1958A-100000@roguetrader.com>

next in thread | raw e-mail | index | archive | help
The macro's use bzero/bcopy... currently:

#define FD_COPY(f, t)   bcopy(f, t, sizeof(*(f))) 
#define FD_ZERO(p)      bzero(p, sizeof(*(p)))

Should probably be (in order to be more standard):

#define FD_COPY(f, t)   memcpy(t, f, sizeof(*(f))) 
#define FD_ZERO(p)      memset(p, 0, sizeof(*(p)))

Unless I'm mistaken?  (for more info on the FD_* look at 'man select')

-Brandon Gillespie




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980115142455.1958A-100000>