Skip to content

Commit

Permalink
Eliminate the local variable 'ape' in audit_pipe_kqread(), as it's only
Browse files Browse the repository at this point in the history
used for an assertion that we don't really need anymore.

MFC after:	1 week
Reported by:	Christoph Mallon <christoph dot mallon at gmx dot de>
  • Loading branch information
rwatson committed Feb 4, 2009
1 parent 91ab06b commit 8ee4f35
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions sys/security/audit/audit_pipe.c
Expand Up @@ -1077,18 +1077,13 @@ audit_pipe_kqfilter(struct cdev *dev, struct knote *kn)
static int
audit_pipe_kqread(struct knote *kn, long hint)
{
struct audit_pipe_entry *ape;
struct audit_pipe *ap;

ap = (struct audit_pipe *)kn->kn_hook;
KASSERT(ap != NULL, ("audit_pipe_kqread: ap == NULL"));

AUDIT_PIPE_LOCK_ASSERT(ap);

if (ap->ap_qlen != 0) {
ape = TAILQ_FIRST(&ap->ap_queue);
KASSERT(ape != NULL, ("audit_pipe_kqread: ape == NULL"));

kn->kn_data = ap->ap_qbyteslen - ap->ap_qoffset;
return (1);
} else {
Expand Down

0 comments on commit 8ee4f35

Please sign in to comment.