FreeBSD/contrib/bsnmp/snmpd/main.c
/*
 * Allocate rx/tx buffer. We allocate one byte more for rx.
 */
Allocate rx/tx buffer. We allocate one byte more for rx.
Allocate rx / tx buffer . We allocate one byte more for rx .
void *
buf_alloc(int tx)
{
	void *buf;
	if ((buf = malloc(tx ? snmpd.txbuf : snmpd.rxbuf)) == NULL) {
		syslog(LOG_CRIT, "cannot allocate buffer");
		if (tx)
			snmpd_stats.noTxbuf++;
		else
			snmpd_stats.noRxbuf++;
		return (NULL);
	}
	return (buf);
}
void * buf_alloc ( int tx ) { void * buf ; if ( ( buf = malloc ( tx ? snmpd . txbuf : snmpd . rxbuf ) ) == NULL ) { syslog ( LOG_CRIT , " " ) ; if ( tx ) snmpd_stats . noTxbuf ++ ; else snmpd_stats . noRxbuf ++ ; return ( NULL ) ; } return ( buf ) ; }
Allocate rx/tx buffer.
Allocate rx / tx buffer .