int flags;
u_int32_t flags;
log_get(dblp, alsn, dbt, flags)	DB_LOG *dblp;	DB_LSN *alsn;	DBT *dbt;	int flags;{	LOG *lp;	int ret;	/* Validate arguments. */#define	OKFLAGS	(DB_CHECKPOINT | \    DB_CURRENT | DB_FIRST | DB_LAST | DB_NEXT | DB_PREV | DB_SET)	if ((ret = __db_fchk(dblp->dbenv, "log_get", flags, OKFLAGS)) != 0)		return (ret);	switch (flags) {	case DB_CHECKPOINT:	case DB_CURRENT:	case DB_FIRST:	case DB_LAST:	case DB_NEXT:	case DB_PREV:	case DB_SET:		break;	default:		return (__db_ferr(dblp->dbenv, "log_get", 1));	}	if (F_ISSET(dblp, DB_AM_THREAD)) {		if (LF_ISSET(DB_NEXT | DB_PREV | DB_CURRENT))			return (__db_ferr(dblp->dbenv, "log_get", 1));		if (!F_ISSET(dbt, DB_DBT_USERMEM | DB_DBT_MALLOC))			return (__db_ferr(dblp->dbenv, "threaded data", 1));	}	lp = dblp->lp;	LOCK_LOGREGION(dblp);	/*	 * If we get one of the log's header records, repeat the operation.	 * This assumes that applications don't ever request the log header	 * records by LSN, but that seems reasonable to me.	 */	ret = __log_get(dblp, alsn, dbt, flags, 0);	if (ret == 0 && alsn->offset == 0) {		switch (flags) {		case DB_FIRST:			flags = DB_NEXT;			break;		case DB_LAST:			flags = DB_PREV;			break;		}		ret = __log_get(dblp, alsn, dbt, flags, 0);	}	UNLOCK_LOGREGION(dblp);	return (ret);}