diff options
-rw-r--r-- | include/linux/msg.h | 6 | ||||
-rw-r--r-- | ipc/msgutil.c | 12 | ||||
-rw-r--r-- | ipc/util.h | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/msg.h b/include/linux/msg.h index 56abf1558fd..70fc369ad24 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h @@ -76,9 +76,9 @@ struct msginfo { /* one msg_msg structure for each message */ struct msg_msg { - struct list_head m_list; - long m_type; - int m_ts; /* message text size */ + struct list_head m_list; + long m_type; + size_t m_ts; /* message text size */ struct msg_msgseg* next; void *security; /* the actual message follows immediately */ diff --git a/ipc/msgutil.c b/ipc/msgutil.c index 26143d377c9..52be05a70df 100644 --- a/ipc/msgutil.c +++ b/ipc/msgutil.c @@ -39,15 +39,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) @@ -101,9 +101,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 *); |