Skip to contentSkip to conversation

ipc: compat_mq sizeof() instead of sizeof

PATCH In review Paul McQuade 2 participants 2 messages Oct 2, 2014 – Oct 7, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipc: compat_mq sizeof() instead of sizeof

added a parenthesis for sizeof function

---
 ipc/compat_mq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
ipc/compat_mq.c +2 -2
index ef6f91c..27496d9 100644
@@ -25,7 +25,7 @@ struct compat_mq_attr {
 static inline int get_compat_mq_attr(struct mq_attr *attr,
 			const struct compat_mq_attr __user *uattr)
 {
-	if (!access_ok(VERIFY_READ, uattr, sizeof *uattr))
+	if (!access_ok(VERIFY_READ, uattr, sizeof(*uattr)))
 		return -EFAULT;
 
 	return __get_user(attr->mq_flags, &uattr->mq_flags)
@@ -37,7 +37,7 @@ static inline int get_compat_mq_attr(struct mq_attr *attr,
 static inline int put_compat_mq_attr(const struct mq_attr *attr,
 			struct compat_mq_attr __user *uattr)
 {
-	if (clear_user(uattr, sizeof *uattr))
+	if (clear_user(uattr, sizeof(*uattr)))
 		return -EFAULT;
 
 	return __put_user(attr->mq_flags, &uattr->mq_flags)
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Paul McQuade

added a parenthesis for sizeof function

This log message could use some enhancement (just a nit)

Other than that:

Quoted 30 lines
---
 ipc/compat_mq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
ipc/compat_mq.c +2 -2
index ef6f91c..27496d9 100644
@@ -25,7 +25,7 @@ struct compat_mq_attr {
 static inline int get_compat_mq_attr(struct mq_attr *attr,
 			const struct compat_mq_attr __user *uattr)
 {
-	if (!access_ok(VERIFY_READ, uattr, sizeof *uattr))
+	if (!access_ok(VERIFY_READ, uattr, sizeof(*uattr)))
 		return -EFAULT;
 
 	return __get_user(attr->mq_flags, &uattr->mq_flags)
@@ -37,7 +37,7 @@ static inline int get_compat_mq_attr(struct mq_attr *attr,
 static inline int put_compat_mq_attr(const struct mq_attr *attr,
 			struct compat_mq_attr __user *uattr)
 {
-	if (clear_user(uattr, sizeof *uattr))
+	if (clear_user(uattr, sizeof(*uattr)))
 		return -EFAULT;
 
 	return __put_user(attr->mq_flags, &uattr->mq_flags)
Signature · 1 line
1.9.1