diff options
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/msgutil.c | 12 | ||||
-rw-r--r-- | ipc/util.h | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/ipc/msgutil.c b/ipc/msgutil.c index 5652101cdac..fc6fded4ff0 100644 --- a/ipc/msgutil.c +++ b/ipc/msgutil.c @@ -37,15 +37,15 @@ struct msg_msgseg { /* the next part of the message follows immediately */ }; -#define DATALEN_MSG (PAGE_SIZE-sizeof(struct msg_msg)) -#define DATALEN_SEG (PAGE_SIZE-sizeof(struct msg_msgseg)) +#define DATALEN_MSG ((size_t)PAGE_SIZE-sizeof(struct msg_msg)) +#define DATALEN_SEG ((size_t)PAGE_SIZE-sizeof(struct msg_msgseg)) -struct msg_msg *load_msg(const void __user *src, int len) +struct msg_msg *load_msg(const void __user *src, size_t len) { struct msg_msg *msg; struct msg_msgseg **pseg; int err; - int alen; + size_t alen; alen = len; if (alen > DATALEN_MSG) @@ -99,9 +99,9 @@ out_err: return ERR_PTR(err); } -int store_msg(void __user *dest, struct msg_msg *msg, int len) +int store_msg(void __user *dest, struct msg_msg *msg, size_t len) { - int alen; + size_t alen; struct msg_msgseg *seg; alen = len; diff --git a/ipc/util.h b/ipc/util.h index 6f5c20bedaa..0bfc934c2f4 100644 --- a/ipc/util.h +++ b/ipc/util.h @@ -138,8 +138,8 @@ int ipc_parse_version (int *cmd); #endif extern void free_msg(struct msg_msg *msg); -extern struct msg_msg *load_msg(const void __user *src, int len); -extern int store_msg(void __user *dest, struct msg_msg *msg, int len); +extern struct msg_msg *load_msg(const void __user *src, size_t len); +extern int store_msg(void __user *dest, struct msg_msg *msg, size_t len); extern void recompute_msgmni(struct ipc_namespace *); |