All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Lindner <lindner_marek@yahoo.de>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batctl: Add timeout filtering option for originators
Date: Wed, 30 Jun 2010 21:35:49 +0200	[thread overview]
Message-ID: <201006302135.50499.lindner_marek@yahoo.de> (raw)
In-Reply-To: <1277920995-25503-1-git-send-email-linus.luessing@web.de>

On Wednesday 30 June 2010 20:03:13 Linus Lüssing wrote:
> +	char msecs_buff[4];
> +	memset(msecs_buff, '0', sizeof(msecs_buff));
> +	msecs_buff[3] = '\0';

Shouldn't a simple 
memset(msecs_buff, 0, sizeof(msecs_buff));
be enough ?



> +			if (sscanf(optarg, "%3d.%3s", &orig_timeout_secs,
> +			else if (sscanf(optarg, "%3d", &orig_timeout_secs) == 1) { ; }
> +			else {

I don't quite understand the sense of the "else if" here. You could also 
write:
else if (sscanf(optarg, "%3d", &orig_timeout_secs) != 1)
and write no else block but I don't see why 1 second should be accepted and 
nothing else ?

Regards,
Marek

  parent reply	other threads:[~2010-06-30 19:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-30 18:03 [B.A.T.M.A.N.] [PATCH] batctl: Add timeout filtering option for originators Linus Lüssing
2010-06-30 18:03 ` [B.A.T.M.A.N.] [PATCH] batctl: Add an optional interval for watch-mode Linus Lüssing
2010-06-30 19:35 ` Marek Lindner [this message]
2010-06-30 22:42   ` [B.A.T.M.A.N.] [PATCH] batctl: Add timeout filtering option for originators Linus Lüssing
2010-06-30 22:29 ` [B.A.T.M.A.N.] Simplifying new interval settings features in batctl Linus Lüssing
2010-06-30 22:29 ` [B.A.T.M.A.N.] [PATCH] batctl: Add timeout filtering option for originators Linus Lüssing
2010-07-01 15:33   ` Marek Lindner
2010-06-30 22:29 ` [B.A.T.M.A.N.] [PATCH] batctl: Add an optional interval for watch-mode Linus Lüssing
  -- strict thread matches above, loose matches on Subject: below --
2010-07-02  0:10 [B.A.T.M.A.N.] batctl: timeout + refresh-interval, v3 Linus Lüssing
2010-07-02  0:10 ` [B.A.T.M.A.N.] [PATCH] batctl: Add timeout filtering option for originators Linus Lüssing

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=201006302135.50499.lindner_marek@yahoo.de \
    --to=lindner_marek@yahoo.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.