Skip to contentSkip to conversation

simplify compat_sys_timerfd.

PATCH In review Heiko Carstens 2 participants 2 messages May 14, 2007 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 simplify compat_sys_timerfd.

From: Heiko Carstens <[email protected]>

Just thought this is easier to read.

---

Feel free to ignore/drop.

 fs/compat.c |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
fs/compat.c +4 -9
Index: linux-2.6/fs/compat.c
===================================================================
@@ -2230,21 +2230,16 @@ asmlinkage long compat_sys_signalfd(int 
 asmlinkage long compat_sys_timerfd(int ufd, int clockid, int flags,
 				   const struct compat_itimerspec __user *utmr)
 {
-	long res;
 	struct itimerspec t;
 	struct itimerspec __user *ut;
 
-	res = -EFAULT;
 	if (get_compat_itimerspec(&t, utmr))
-		goto err_exit;
+		return -EFAULT;
 	ut = compat_alloc_user_space(sizeof(*ut));
-	if (copy_to_user(ut, &t, sizeof(t)) )
-		goto err_exit;
+	if (copy_to_user(ut, &t, sizeof(t)))
+		return -EFAULT;
 
-	res = sys_timerfd(ufd, clockid, flags, ut);
-err_exit:
-	return res;
+	return sys_timerfd(ufd, clockid, flags, ut);
 }
 
 #endif /* CONFIG_TIMERFD */
-