[PATCH v3 2/7] Add a general netlink socket parser

Dmitry V. Levin ldv at altlinux.org
Thu Jun 16 10:15:10 UTC 2016


On Thu, Jun 16, 2016 at 04:36:47AM +0300, Dmitry V. Levin wrote:
> On Wed, Jun 15, 2016 at 12:43:00PM +0000, Fabien Siron wrote:
[...]
> > +void
> > +decode_netlink(struct tcb *tcp, unsigned long addr, unsigned long size)
> > +{
> > +	struct nlmsghdr nlmsghdr;
> > +
> > +	if (size < sizeof(struct nlmsghdr)) {
> > +		printaddr((unsigned long)addr);
> 
> addr is of type unsigned long, no need to cast.

Besides that, it's more appropriate to printstr instead of printaddr,
like with non-netlink sockets.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160616/ed63c3d8/attachment.bin>


More information about the Strace-devel mailing list