소스 검색

* my_atoul should use a const char*

Bryan Drewery 17 년 전
부모
커밋
cc681da0a7
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      src/net.c
  2. 1 1
      src/net.h

+ 2 - 2
src/net.c

@@ -91,14 +91,14 @@ port_t firewallport = 1080;    /* Default port of Sock4/5 firewalls        */
 
 /* I need an UNSIGNED long for dcc type stuff
  */
-unsigned long my_atoul(char *s)
+unsigned long my_atoul(const char *s)
 {
   unsigned long ret = 0;
 
   while ((*s >= '0') && (*s <= '9')) {
     ret *= 10;
     ret += ((*s) - '0');
-    s++;
+    ++s;
   }
   return ret;
 }

+ 1 - 1
src/net.h

@@ -111,7 +111,7 @@ typedef struct {
 
 # define killsock(x)     	real_killsock((x),__FILE__,__LINE__)
 
-unsigned long my_atoul(char *);
+unsigned long my_atoul(const char *);
 #ifdef HAVE_SSL
 int ssl_cleanup();
 int ssl_link(int, int);