]> git.ozlabs.org Git - ppp.git/commitdiff
Remove various warnings, fix pppol2tp install
authorPaul Mackerras <paulus@samba.org>
Tue, 19 Aug 2008 11:25:58 +0000 (21:25 +1000)
committerPaul Mackerras <paulus@samba.org>
Tue, 19 Aug 2008 11:25:58 +0000 (21:25 +1000)
This fixes a collection of minor things that were resulting in
harmless warnings (accidental trigraphs, missing prototypes,
signed/unsigned char being used interchangeably) and corrects
an error in the pppol2tp makefile, which meant that it wasn't
installing anything.

Signed-off-by: Paul Mackerras <paulus@samba.org>
chat/chat.c
pppd/ipxcp.c
pppd/md5.c
pppd/md5.h
pppd/plugins/pppol2tp/Makefile.linux
pppd/session.c

index dc6cf2e3dea8a6fc75f5a4f1f66a40543dd475f2..0b88c279156b029f371ffe703a33c0d0cb7b19d4 100644 (file)
@@ -1303,7 +1303,7 @@ register char *s;
 
     if (verbose) {
        if (quiet)
-           msgf("send (??????)");
+           msgf("send (?????\?)");
        else
            msgf("send (%v)", s);
     }
index f0ee696854f9c63626a757af18059daf73306de6..7b2343e155377120273793d3be2ce2cf28daff29 100644 (file)
@@ -289,7 +289,7 @@ static int
 setipxnode(argv)
     char **argv;
 {
-    char *end;
+    u_char *end;
     int have_his = 0;
     u_char our_node[6];
     u_char his_node[6];
@@ -343,7 +343,7 @@ static int
 setipxname (argv)
     char **argv;
 {
-    char *dest = ipxcp_wantoptions[0].name;
+    u_char *dest = ipxcp_wantoptions[0].name;
     char *src  = *argv;
     int  count;
     char ch;
@@ -593,7 +593,7 @@ ipxcp_cilen(f)
 
     len         = go->neg_nn       ? CILEN_NETN     : 0;
     len += go->neg_node            ? CILEN_NODEN    : 0;
-    len += go->neg_name            ? CILEN_NAME + strlen (go->name) - 1 : 0;
+    len += go->neg_name            ? CILEN_NAME + strlen ((char *)go->name) - 1 : 0;
 
     /* RFC says that defaults should not be included. */
     if (go->neg_router && to_external(go->router) != RIP_SAP)
@@ -630,7 +630,7 @@ ipxcp_addci(f, ucp, lenp)
     }
 
     if (go->neg_name) {
-       int cilen = strlen (go->name);
+           int cilen = strlen ((char *)go->name);
        int indx;
        PUTCHAR (IPX_ROUTER_NAME, ucp);
        PUTCHAR (CILEN_NAME + cilen - 1, ucp);
@@ -699,7 +699,7 @@ ipxcp_ackci(f, p, len)
     }
 
 #define ACKCINODE(opt,neg,val) ACKCICHARS(opt,neg,val,sizeof(val))
-#define ACKCINAME(opt,neg,val) ACKCICHARS(opt,neg,val,strlen(val))
+#define ACKCINAME(opt,neg,val) ACKCICHARS(opt,neg,val,strlen((char *)val))
 
 #define ACKCINETWORK(opt, neg, val) \
     if (neg) { \
@@ -923,7 +923,7 @@ ipxcp_rejci(f, p, len)
     }
 
 #define REJCINODE(opt,neg,val) REJCICHARS(opt,neg,val,sizeof(val))
-#define REJCINAME(opt,neg,val) REJCICHARS(opt,neg,val,strlen(val))
+#define REJCINAME(opt,neg,val) REJCICHARS(opt,neg,val,strlen((char *)val))
 
 #define REJCIVOID(opt, neg) \
     if (neg && p[0] == opt) { \
@@ -1453,8 +1453,8 @@ ipxcp_script(f, script)
     argv[6]  = strremote;
     argv[7]  = strproto_lcl;
     argv[8]  = strproto_rmt;
-    argv[9]  = go->name;
-    argv[10] = ho->name;
+    argv[9]  = (char *)go->name;
+    argv[10] = (char *)ho->name;
     argv[11] = ipparam;
     argv[12] = strpid;
     argv[13] = NULL;
@@ -1580,7 +1580,7 @@ ipxcp_printpkt(p, plen, printer, arg)
     case TERMREQ:
        if (len > 0 && *p >= ' ' && *p < 0x7f) {
            printer(arg, " ");
-           print_string(p, len, printer, arg);
+           print_string((char *)p, len, printer, arg);
            p += len;
            len = 0;
        }
index 20397603834b8f4c1226befa324f6722a1771101..f1291ce1bd72fde3be4e2b1133193130d1cd274e 100644 (file)
@@ -48,7 +48,7 @@
  */
 
 /* forward declaration */
-static void Transform ();
+static void Transform (UINT4 *buf, UINT4 *in);
 
 static unsigned char PADDING[64] = {
   0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
index f7a0c9641834ed878a732ac83f2a8dca77ae824a..71e8b00e2dde9e481384b43866c9b0e091ac3408 100644 (file)
@@ -57,9 +57,9 @@ typedef struct {
   unsigned char digest[16];     /* actual digest after MD5Final call */
 } MD5_CTX;
 
-void MD5_Init ();
-void MD5_Update ();
-void MD5_Final ();
+void MD5_Init (MD5_CTX *mdContext);
+void MD5_Update (MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen);
+void MD5_Final (unsigned char hash[], MD5_CTX *mdContext);
 
 #define __MD5_INCLUDE__
 #endif /* __MD5_INCLUDE__ */
index efc65542dc68a87b1906bf940aabe71cca5d9826..19eff67a439449056e80a1ec5a290cfbabb9b2e5 100644 (file)
@@ -20,7 +20,7 @@ all: $(PLUGINS)
 
 install: all
        $(INSTALL) -d -m 755 $(LIBDIR)
-       $(INSTALL) -c -m 4550 $(PLUGIN) $(LIBDIR)
+       $(INSTALL) -c -m 4550 $(PLUGINS) $(LIBDIR)
 
 clean:
        rm -f *.o *.so
index 491d3bfaac11c79791f5fd3eba2628aa89397a4a..db70b436e8deacbc91084c4d67ef5f59063b4749 100644 (file)
@@ -372,11 +372,13 @@ session_start(flags, user, passwd, ttyName, msg)
        if (pw != NULL) {
             struct lastlog ll;
             int fd;
+           time_t tnow;
 
             if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) {
                 (void)lseek(fd, (off_t)(pw->pw_uid * sizeof(ll)), SEEK_SET);
                 memset((void *)&ll, 0, sizeof(ll));
-                (void)time(&ll.ll_time);
+               (void)time(&tnow);
+                ll.ll_time = tnow;
                 (void)strncpy(ll.ll_line, ttyName, sizeof(ll.ll_line));
                 (void)strncpy(ll.ll_host, ifname, sizeof(ll.ll_host));
                 (void)write(fd, (char *)&ll, sizeof(ll));