adapt PacketGetAdapterNames to 0.4.8 calling convention

PR:		bin/94735
Submitted by:	Scot Hetzel <swhetzel@gmail.com>
Requested by:	scottl
This commit is contained in:
sam 2006-04-12 17:12:04 +00:00
parent dd51e2368b
commit 638ab32010

View File

@ -246,15 +246,15 @@ PacketGetAdapterNames(namelist, len)
mib[5] = 0; /* no flags */
if (sysctl (mib, 6, NULL, &needed, NULL, 0) < 0)
return(EIO);
return(FALSE);
buf = malloc (needed);
if (buf == NULL)
return(ENOMEM);
return(FALSE);
if (sysctl (mib, 6, buf, &needed, NULL, 0) < 0) {
free(buf);
return(EIO);
return(FALSE);
}
lim = buf + needed;
@ -269,7 +269,7 @@ PacketGetAdapterNames(namelist, len)
if (strnstr(sdl->sdl_data, "ndis", sdl->sdl_nlen)) {
if ((spc + sdl->sdl_nlen) > *len) {
free(buf);
return(ENOSPC);
return(FALSE);
}
strncpy(plist, sdl->sdl_data, sdl->sdl_nlen);
plist += (sdl->sdl_nlen + 1);
@ -302,7 +302,7 @@ PacketGetAdapterNames(namelist, len)
if (strnstr(sdl->sdl_data, "ndis", sdl->sdl_nlen)) {
if ((spc + sdl->sdl_nlen) > *len) {
free(buf);
return(ENOSPC);
return(FALSE);
}
strncpy(plist, sdl->sdl_data, sdl->sdl_nlen);
plist += (sdl->sdl_nlen + 1);
@ -317,7 +317,7 @@ PacketGetAdapterNames(namelist, len)
*len = spc + 1;
return(0);
return(TRUE);
}
void