[BACK]Return to cmds.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ftp

Diff for /src/usr.bin/ftp/cmds.c between version 1.49 and 1.50

version 1.49, 2005/10/12 06:50:42 version 1.50, 2006/04/25 05:45:20
Line 60 
Line 60 
  */   */
   
 #if !defined(lint) && !defined(SMALL)  #if !defined(lint) && !defined(SMALL)
 static char rcsid[] = "$OpenBSD$";  static const char rcsid[] = "$OpenBSD$";
 #endif /* not lint and not SMALL */  #endif /* not lint and not SMALL */
   
 /*  /*
Line 779 
Line 779 
         else if (strcasecmp(argv[1], "off") == 0)          else if (strcasecmp(argv[1], "off") == 0)
                 hash = 0;                  hash = 0;
         else {          else {
                 long nmark;                  int nmark;
                 char *ep;                  const char *errstr;
   
                 nmark = strtol(argv[1], &ep, 10);                  nmark = strtonum(argv[1], 1, INT_MAX, &errstr);
                 if (nmark < 1 || nmark > INT_MAX || *ep != '\0') {                  if (errstr) {
                         fprintf(ttyout, "%s: bad bytecount value.\n", argv[1]);                          fprintf(ttyout, "bytecount value is %s: %s\n",
                               errstr, argv[1]);
                         code = -1;                          code = -1;
                         return;                          return;
                 }                  }
Line 940 
Line 941 
                 else if (strcasecmp(argv[1], "off") == 0)                  else if (strcasecmp(argv[1], "off") == 0)
                         debug = 0;                          debug = 0;
                 else {                  else {
                         char *ep;                          const char *errstr;
                         long val;                          int val;
   
                         val = strtol(argv[1], &ep, 10);                          val = strtonum(argv[1], 0, INT_MAX, &errstr);
                         if (val < 0 || val > INT_MAX || *ep != '\0') {                          if (errstr) {
                                 fprintf(ttyout, "%s: bad debugging value.\n",                                  fprintf(ttyout, "debugging value is %s: %s\n",
                                     argv[1]);                                      errstr, argv[1]);
                                 code = -1;                                  code = -1;
                                 return;                                  return;
                         }                          }
                         debug = (int)val;                          debug = val;
                 }                  }
         } else          } else
                 debug = !debug;                  debug = !debug;

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50