int s;
gbuf_t *xm;
ioc_t *iocbp;
- CCBPtr sp = (CCBPtr)gbuf_rptr(((gbuf_t *)gref->info));
+ CCBPtr sp;
+
+ if (gref->info)
+ sp = (CCBPtr)gbuf_rptr(((gbuf_t *)gref->info));
+ else
+ sp = 0;
if (gbuf_type(mp) == MSG_IOCTL) {
iocbp = (ioc_t *)gbuf_rptr(mp);
case DDP_IOC_GET_CFG:
/* respond to an DDP_IOC_GET_CFG sent on an adsp fd */
if (((xm = gbuf_cont(mp)) == NULL) &&
- (xm = gbuf_alloc(sizeof(at_inet_t), PRI_MED)) == NULL) {
+ (xm = gbuf_alloc(sizeof(ddp_addr_t), PRI_MED)) == NULL) {
iocbp->ioc_rval = -1;
adsp_iocnak(gref, mp, ENOBUFS);
return 0;
int s;
sMax = flag ? DDP_SOCKET_LAST-46 : DDP_SOCKET_LAST-6;
- sMin = DDP_SOCKET_1st_DYNAMIC-64;
+ sMin = DDP_SOCKET_1st_DYNAMIC;
ATDISABLE(s, adspall_lock);
for (inputC=255, sVal=sMax; sVal >= sMin; sVal--) {