FreeBSD/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_printer_tbl.c
/**
 * Create entry into the printer table.
 */
Create entry into the printer table.
Create entry into the printer table .
static struct printer_entry *
printer_entry_create(const struct device_entry *devEntry)
{
	struct printer_entry *entry = NULL;
	assert(devEntry != NULL);
	if (devEntry == NULL)
		return (NULL);
	if ((entry = malloc(sizeof(*entry))) == NULL) {
		syslog(LOG_WARNING, "hrPrinterTable: %s: %m", __func__);
		return (NULL);
	}
	memset(entry, 0, sizeof(*entry));
	entry->index = devEntry->index;
	INSERT_OBJECT_INT(entry, &printer_tbl);
	return (entry);
}
static struct printer_entry * printer_entry_create ( const struct device_entry * devEntry ) { struct printer_entry * entry = NULL ; assert ( devEntry != NULL ) ; if ( devEntry == NULL ) return ( NULL ) ; if ( ( entry = malloc ( sizeof ( * entry ) ) ) == NULL ) { syslog ( LOG_WARNING , " " , __func__ ) ; return ( NULL ) ; } memset ( entry , 0 , sizeof ( * entry ) ) ; entry -> index = devEntry -> index ; INSERT_OBJECT_INT ( entry , & printer_tbl ) ; return ( entry ) ; }
Create entry into the printer table.
Create entry into the printer table .