gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] [PATCH] gps2udp: fix port number conversion


From: Gary E. Miller
Subject: Re: [gpsd-dev] [PATCH] gps2udp: fix port number conversion
Date: Wed, 18 Dec 2013 17:39:50 -0800

Yo Ferry!

On Wed, 18 Dec 2013 15:52:00 +0100
Ferry Huberts <address@hidden> wrote:

> Without this modification I always get an errno != 0

Rather than mask the error maybe track it down?

> +       errno = 0;
>         portnum = atoi(portname);
>         if (errno != 0) {

atoi() can never throw an errno, that makes the follow test never true.
So the test for 'portname' to be a number is bogus and needs to be fixed.

Maybe, for debug, print errno and try to find what is setting it?  Sounds
like maybe another, uncaught, problem earlier in the program.


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
        address@hidden  Tel:+1(541)382-8588

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]