#29 datatype issue in command line parseing

major
closed-fixed
server (16)
5
2002-11-15
2002-10-21
Anonymous
No

the process_command_line () function in server/main.c (line
310) is char c; in current CVS builds.
This is incorrect for its use with getopt (which returns an
int).
This is not an issue on architectures where char is signed
by default however on ARM char is unsigned and hence
the -1 check for "no more opts" fails.
This results in an infinite loop with no output at daemon
start time.
Simply changing the char to an int fixes this issue on the
ARM architecture and does not cause issue on other
arches.

Discussion

    • assigned_to: nobody --> gfk
    • status: open --> closed-fixed
     
  • Logged In: YES
    user_id=53970

    Fixed.

    stable-0-4-4:
    Checking in server/main.c;
    /cvsroot/lcdproc/lcdproc/server/main.c,v <-- main.c
    new revision: 1.38.2.18.2.4; previous revision: 1.38.2.18.2.3
    done
    current-0-5:
    Checking in server/main.c;
    /cvsroot/lcdproc/lcdproc/server/main.c,v <-- main.c
    new revision: 1.50; previous revision: 1.49
    done