diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2017-07-19 10:07:34 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2017-07-19 10:07:34 +0000 |
commit | c56a3c361ccd94b186e50668a4797baf15e7ecc5 (patch) | |
tree | d4eee89902d14bb255aab7a512601226053bd7f9 /nlattr.c | |
parent | a950e13865075aeb9d13e3130bed919bbe193f94 (diff) | |
download | strace-c56a3c361ccd94b186e50668a4797baf15e7ecc5.tar.gz |
Adjust prototypes of netlink parsing functions
Change the type of "len" argument that is based
on struct nlmsghdr.nlmsg_len from kernel_ulong_t to unsigned int.
* defs.h (netlink_decoder_t, DECL_NETLINK): Change "len" argument type
from kernel_ulong_t to unsigned int.
* netlink.c (decode_nlmsgerr_attr_cookie, decode_nlmsgerr,
decode_payload): Likewise.
* netlink_selinux.c (decode_netlink_selinux): Likewise.
* netlink_sock_diag.c (decode_family, decode_unix_diag_req,
decode_meminfo, decode_unix_diag_vfs, decode_unix_diag_inode,
decode_unix_diag_rqlen, decode_unix_diag_msg, decode_netlink_diag_req,
print_group, decode_netlink_diag_ring, decode_netlink_diag_flags,
decode_netlink_diag_msg, decode_packet_diag_req,
decode_packet_diag_info, decode_packet_diag_mclist,
decode_packet_diag_ring, decode_packet_diag_filter,
decode_packet_diag_msg, decode_inet_addr, decode_inet_diag_hostcond,
decode_inet_diag_markcond, decode_bytecode_data, decode_inet_diag_bc_op,
decode_inet_diag_req_compat, decode_inet_diag_req_v2,
decode_inet_diag_req, decode_inet_diag_meminfo, decode_tcpvegas_info,
decode_tcp_dctcp_info, decode_tcp_bbr_info, decode_inet_diag_msg,
decode_smc_diag_req, decode_smc_diag_conninfo, decode_smc_diag_lgrinfo,
decode_smc_diag_msg, netlink_diag_decoder_t, decode_netlink_sock_diag):
Likewise.
* nlattr.c (fetch_nlattr, decode_nlattr_with_data, decode_nlattr,
decode_nla_str, decode_nla_strn, DECODE_NLA_INTEGER): Likewise.
* nlattr.h (nla_decoder_t, DECL_NLA, decode_nlattr): Likewise.
Diffstat (limited to 'nlattr.c')
-rw-r--r-- | nlattr.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -33,7 +33,7 @@ static bool fetch_nlattr(struct tcb *const tcp, struct nlattr *const nlattr, - const kernel_ulong_t addr, const kernel_ulong_t len) + const kernel_ulong_t addr, const unsigned int len) { if (len < sizeof(struct nlattr)) { printstr_ex(tcp, addr, len, QUOTE_FORCE_HEX); @@ -64,7 +64,7 @@ static void decode_nlattr_with_data(struct tcb *const tcp, const struct nlattr *const nla, const kernel_ulong_t addr, - const kernel_ulong_t len, + const unsigned int len, const struct xlat *const table, const char *const dflt, const nla_decoder_t *const decoders, @@ -95,7 +95,7 @@ decode_nlattr_with_data(struct tcb *const tcp, void decode_nlattr(struct tcb *const tcp, kernel_ulong_t addr, - kernel_ulong_t len, + unsigned int len, const struct xlat *const table, const char *const dflt, const nla_decoder_t *const decoders, @@ -112,9 +112,9 @@ decode_nlattr(struct tcb *const tcp, break; } - const unsigned long nla_len = NLA_ALIGN(nla.nla_len); + const unsigned int nla_len = NLA_ALIGN(nla.nla_len); kernel_ulong_t next_addr = 0; - kernel_ulong_t next_len = 0; + unsigned int next_len = 0; if (nla.nla_len >= NLA_HDRLEN) { next_len = (len >= nla_len) ? len - nla_len : 0; @@ -147,7 +147,7 @@ decode_nlattr(struct tcb *const tcp, bool decode_nla_str(struct tcb *const tcp, const kernel_ulong_t addr, - const kernel_ulong_t len, + const unsigned int len, const void *const opaque_data) { printstr_ex(tcp, addr, len, QUOTE_0_TERMINATED); @@ -158,7 +158,7 @@ decode_nla_str(struct tcb *const tcp, bool decode_nla_strn(struct tcb *const tcp, const kernel_ulong_t addr, - const kernel_ulong_t len, + const unsigned int len, const void *const opaque_data) { printstrn(tcp, addr, len); @@ -170,7 +170,7 @@ decode_nla_strn(struct tcb *const tcp, bool \ decode_nla_ ## name(struct tcb *const tcp, \ const kernel_ulong_t addr, \ - const kernel_ulong_t len, \ + const unsigned int len, \ const void *const opaque_data) \ { \ type num; \ |