From 68889ed6994b8e5a470c962d7ebaeb36518d73e9 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 17 Aug 2011 12:37:14 +0000 Subject: [PATCH] Fix build breakage. Initialize error variables explicitely for !MAC case. Pointy hat to: kib Approved by: re (bz) --- sys/kern/uipc_sem.c | 1 + sys/kern/uipc_shm.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c index 95c29c0f0f2e..f77bf3b9d5a3 100644 --- a/sys/kern/uipc_sem.c +++ b/sys/kern/uipc_sem.c @@ -270,6 +270,7 @@ ksem_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, struct ksem *ks; int error; + error = 0; ks = fp->f_data; mtx_lock(&sem_lock); #ifdef MAC diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 45989cfeab63..57fd5eb413eb 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -699,6 +699,7 @@ shm_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, struct shmfd *shmfd; int error; + error = 0; shmfd = fp->f_data; mtx_lock(&shm_timestamp_lock); #ifdef MAC