X-Git-Url: https://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=utils%2Fmgnokiidev.c;h=78b20904dcaf0878aa98965c815ac85a44f3b55c;hp=e6b80a90f2b442834de91b8e9e706c62aa1ef4a7;hb=a2dfc99dc499ea8600bf5178f8122125d7d7d557;hpb=1fdb423c0a2e33c1282bec25de66d9f40d56999b diff --git a/utils/mgnokiidev.c b/utils/mgnokiidev.c index e6b80a9..78b2090 100644 --- a/utils/mgnokiidev.c +++ b/utils/mgnokiidev.c @@ -6,24 +6,11 @@ A Linux/Unix toolset and driver for Nokia mobile phones. - Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janík ml. - Released under the terms of the GNU GPL, see file COPYING for more details. Mgnokiidev gets passed a slave pty name by gnokiid and uses this information to create a symlink from the pty to /dev/gnokii. - $Log$ - Revision 1.1.1.1 2001/11/25 21:59:23 short - :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Sun Nov 25 22:56 CET 2001 - - Revision 1.7 2001/09/14 12:38:00 pkot - More cleanups - - Revision 1.6 2000/12/27 10:54:15 pkot - Added Unix98 PTYs support (Michael Mráka). - - */ #include @@ -44,7 +31,7 @@ int main(int argc, char *argv[]) { - int count, err, aux; + int count, err; char dev_name[DEVLEN]; /* Check we have one and only one command line argument. */ @@ -62,8 +49,7 @@ int main(int argc, char *argv[]) strncpy(dev_name, argv[1], DEVLEN); /* Check for suspicious characters. */ - aux = strlen(dev_name); - for (count = 0; count < aux; count ++) + for (count = 0; count < strlen(dev_name); count ++) if (!(isalnum(dev_name[count]) || dev_name[count]=='/')) { fprintf(stderr, "Suspicious character at index %d in argument.\n", count); exit (-2);