[PATCH 1/3] idiag: don't dump unset properties of idiag_msg
Thomas Haller
thaller at redhat.com
Thu Nov 27 08:01:32 PST 2014
On Thu, 2014-11-27 at 14:48 +0000, Thomas Graf wrote:
> On 11/27/14 at 01:09pm, Thomas Haller wrote:
> > Signed-off-by: Thomas Haller <thaller at redhat.com>
>
> Acked-by: Thomas Graf <tgraf at suug.ch>
all three patches merged as:
https://github.com/thom311/libnl/commit/bf4b042ed1fdd304a541e412970d6757475d5ecc
> > ---
> > lib/idiag/idiag_msg_obj.c | 46 ++++++++++++++++++++++++----------------------
> > 1 file changed, 24 insertions(+), 22 deletions(-)
> >
> > diff --git a/lib/idiag/idiag_msg_obj.c b/lib/idiag/idiag_msg_obj.c
> > index 8199536..6e4948e 100644
> > --- a/lib/idiag/idiag_msg_obj.c
> > +++ b/lib/idiag/idiag_msg_obj.c
> > @@ -458,7 +458,7 @@ static void idiag_msg_dump_details(struct nl_object *a, struct nl_dump_params *p
> >
> > nl_dump(p, "tos: 0x%x\n", msg->idiag_tos);
> > nl_dump(p, "traffic class: %d\n", msg->idiag_tclass);
> > - nl_dump(p, "congestion algorithm: %s\n", msg->idiag_cong);
> > + nl_dump(p, "congestion algorithm: %s\n", msg->idiag_cong ? msg->idiag_cong : "");
>
> If you want to write this shorter next time, you can just do:
>
> + nl_dump(p, "congestion algorithm: %s\n", msg->idiag_cong ? : "");
I changed it before merging.
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20141127/b3ad33bf/attachment.sig>
More information about the libnl
mailing list