Message ID | 1473928860-30519-1-git-send-email-apape@phoenixcontact.com (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | e397137aa9f4417ec21b4ba3db59b4f4e55b72fd |
Delegated to: | Sven Eckelmann |
Headers |
Return-Path: <b.a.t.m.a.n-bounces@lists.open-mesh.org> X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 0F47681DEF; Thu, 15 Sep 2016 10:41:53 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=phoenixcontact.com Received-SPF: None (no SPF record) identity=mailfrom; client-ip=62.157.123.121; helo=mail2.phoenixcontact.com; envelope-from=apape@phoenixcontact.com; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=phoenixcontact.com Received: from mail2.phoenixcontact.com (mail2.phoenixcontact.com [62.157.123.121]) by open-mesh.org (Postfix) with ESMTPS id D4E5781477 for <b.a.t.m.a.n@lists.open-mesh.org>; Thu, 15 Sep 2016 10:41:49 +0200 (CEST) Received: from localhost.localdomain ([149.208.237.60]) by de-nice01.de.phoenixcontact.com with ESMTP id 2016091510414749-46192 ; Thu, 15 Sep 2016 10:41:47 +0200 From: Andreas Pape <apape@phoenixcontact.com> To: b.a.t.m.a.n@lists.open-mesh.org X-Mailer: git-send-email 1.7.0.4 X-MIMETrack: Itemize by SMTP Server on DE-NICE01/Hub/SRV/DE/Phoenix Contact at 15.09.2016 10:41:47, Serialize by ntm_grab.EXE on nemex02/spoke/SRV/DE/Phoenix Contact at 15.09.2016 10:41:44, Serialize complete at 15.09.2016 10:41:44, Itemize by ntm_grab.EXE on nemex02/spoke/SRV/DE/Phoenix Contact at 15.09.2016 10:41:44, Serialize by Router on nemex02/spoke/SRV/DE/Phoenix Contact at 15.09.2016 10:41:44 X-TNEFEvaluated: 1 Message-ID: <1473928860-30519-1-git-send-email-apape@phoenixcontact.com> Date: Thu, 15 Sep 2016 10:41:00 +0200 content-transfer-encoding: quoted-printable content-type: text/plain; charset="utf-8" Subject: [B.A.T.M.A.N.] [PATCH] batctl: optchar variable uses wrong type X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n.lists.open-mesh.org> List-Unsubscribe: <https://lists.open-mesh.org/mm/options/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=unsubscribe> List-Archive: <http://lists.open-mesh.org/pipermail/b.a.t.m.a.n/> List-Post: <mailto:b.a.t.m.a.n@lists.open-mesh.org> List-Help: <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=help> List-Subscribe: <https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=subscribe> Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n@lists.open-mesh.org> Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" <b.a.t.m.a.n-bounces@lists.open-mesh.org> |
Commit Message
Andreas Pape
Sept. 15, 2016, 8:41 a.m. UTC
The variable "optchar" used char instead of int leading to a non
working batctl tp command as the while loop parsing the tp
arguments with the getopt command is only left via the "default"
case leaving the tp subcommand unusable. Using type char also
lead to a compiler warning.
Signed-off-by: Andreas Pape <apape@phoenixcontact.com>
---
tp_meter.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--
1.7.0.4
..................................................................
PHOENIX CONTACT ELECTRONICS GmbH
Sitz der Gesellschaft / registered office of the company: 31812 Bad Pyrmont
USt-Id-Nr.: DE811742156
Amtsgericht Hannover HRB 100528 / district court Hannover HRB 100528
Geschäftsführer / Executive Board: Ulrich Leidecker, Christoph Leifer
Comments
On Donnerstag, 15. September 2016 10:41:00 CEST Andreas Pape wrote: > The variable "optchar" used char instead of int leading to a non > working batctl tp command as the while loop parsing the tp > arguments with the getopt command is only left via the "default" > case leaving the tp subcommand unusable. Using type char also > lead to a compiler warning. I find the commit message extreme confusing. It think you wanted to describe following problem: * some platform C ABIs define char as unsigned * getopt can return negative values * the loop "around" getopt waits for a negative value to stop (which never happens with an unsigned char) But the code change itself looks good. Reviewed-by: Sven Eckelmann <sven@narfation.org> Kind regards, Sven > --- > tp_meter.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/tp_meter.c b/tp_meter.c > index 7fe0d56..10dc2b9 100644 > --- a/tp_meter.c > +++ b/tp_meter.c > @@ -395,7 +395,7 @@ int tp_meter(char *mesh_iface, int argc, char **argv) > int ret = EXIT_FAILURE; > int found_args = 1, read_opt = USE_BAT_HOSTS; > uint32_t time = 0; > - char optchar; > + int optchar; > struct nl_sock *listen_sock = NULL; > struct tp_result result = { > .error = 0,
Hi all – since the beginning of the open-mesh development platform Axel Neumann and I have been paying the domain registration fees for open-mesh.net and open-mesh.org. Since Axel went on to work for bmx as a seperate project a few years ago, I'm paying the fees every year out of my pocket. This year I'm on a tight budget. So if anyone wants to throw in a coin or two to share the costs, this would be appreciated. The amount due this year is around 39 Euro. If you want to donate, drop me a personal e-mail. Cheers, Elektra
On Donnerstag, 15. September 2016 14:02:13 CEST elektra wrote: > Hi all – Please don't hijack other threads ;) [...] > This year I'm on a tight budget. So if anyone wants to throw in a coin or > two to share the costs, this would be appreciated. The amount due this year > is around 39 Euro. I personally would pay for the open-mesh.org address. I will send you a private mail to discuss the transfer. Kind regards, Sven
Hi, On Thursday, September 15, 2016 2:30:20 PM CEST Sven Eckelmann wrote: > On Donnerstag, 15. September 2016 14:02:13 CEST elektra wrote: > > Hi all – > > Please don't hijack other threads ;) > > [...] > > > This year I'm on a tight budget. So if anyone wants to throw in a coin or > > two to share the costs, this would be appreciated. The amount due this > > year > > is around 39 Euro. > > I personally would pay for the open-mesh.org address. I will send you a > private mail to discuss the transfer. I can also help out. Do we still need the .net domain? I think we are primarily using open-mesh.org anyway, and having two domains doesn't really help (and costs money ;]). What do you think? Cheers, Simon
On Donnerstag, 15. September 2016 10:41:00 CEST Andreas Pape wrote: > The variable "optchar" used char instead of int leading to a non > working batctl tp command as the while loop parsing the tp > arguments with the getopt command is only left via the "default" > case leaving the tp subcommand unusable. Using type char also > lead to a compiler warning. > > Signed-off-by: Andreas Pape <apape@phoenixcontact.com> > Reviewed-by: Sven Eckelmann <sven@narfation.org> > --- > tp_meter.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) Applied in e397137aa9f4417ec21b4ba3db59b4f4e55b72fd [1]. The commit messages was slightly modified to (hopefully) make it more readable. Kind regards, Sven [1] https://git.open-mesh.org/batctl.git/commit/e397137aa9f4417ec21b4ba3db59b4f4e55b72fd
diff --git a/tp_meter.c b/tp_meter.c index 7fe0d56..10dc2b9 100644 --- a/tp_meter.c +++ b/tp_meter.c @@ -395,7 +395,7 @@ int tp_meter(char *mesh_iface, int argc, char **argv) int ret = EXIT_FAILURE; int found_args = 1, read_opt = USE_BAT_HOSTS; uint32_t time = 0; - char optchar; + int optchar; struct nl_sock *listen_sock = NULL; struct tp_result result = { .error = 0,