public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 2/2] network/in6_02: Rewrite to the new library
Date: Fri, 20 Apr 2018 20:33:52 +0200	[thread overview]
Message-ID: <20180420183352.GA27963@x230> (raw)
In-Reply-To: <3e9d5d4f-18f8-51b3-746c-e64a6cf4cf68@oracle.com>

Hi Alexey,

> > -	tst_resm(TPASS, "if_indextoname() tests succeed");
> > +	tst_res(TPASS, "if_indextoname() test succeed");
>                                                  ^
>                                              succeeded?
Good catch, thanks.

> >  }...
> > -	for (i = 0; pini[i].if_index; ++i) {
> > +	for (i = 0; pini[i].if_index; i++) {
> ... 
> > +	/*
> > +	 * we need to leak at least a page to detect a leak; 1 byte per call
> >  	 * will be detected with getpagesize() calls.
> >  	 */
> >  	freenicount = getpagesize();
> > -	for (i = 0; i < freenicount; ++i) {
> > +	for (i = 0; i < freenicount; i++) {

> Hmm, looks like you are intentionally changing '++i' with 'i++' for
> the all 'for' loops in this patch, any good reason to do that?
No, it seems to me convention/readability.
$ git grep i++ |wc -l
2369
$ git grep ++i |wc -l
220
But it's unimportant, I'll remove that.

> Other than that, the patch looks good.


Kind regards,
Petr

  reply	other threads:[~2018-04-20 18:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20  7:21 [LTP] [PATCH v3 1/2] network/in6_02: Don't use default value for LHOST_IFACES Petr Vorel
2018-04-20  7:21 ` [LTP] [PATCH v3 2/2] network/in6_02: Rewrite to the new library Petr Vorel
2018-04-20 14:04   ` Alexey Kodanev
2018-04-20 18:33     ` Petr Vorel [this message]
2018-04-23 14:19     ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180420183352.GA27963@x230 \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox