summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormks <mks@FreeBSD.org>1999-07-01 20:48:59 +0000
committermks <mks@FreeBSD.org>1999-07-01 20:48:59 +0000
commit7707e35f12ca77282d0d391e98bf0db7bf1b734c (patch)
tree4a3901b074c8e4dd2814e00f82d841659871f67a /lib
parent22e38b45b20e68f38edb59cfdd12a4422d39c6c4 (diff)
downloadFreeBSD-src-7707e35f12ca77282d0d391e98bf0db7bf1b734c.zip
FreeBSD-src-7707e35f12ca77282d0d391e98bf0db7bf1b734c.tar.gz
Modify code to be -Wall'able.
PR: bin/11315
Diffstat (limited to 'lib')
-rw-r--r--lib/libatm/atm_addr.c19
-rw-r--r--lib/libatm/cache_key.c17
-rw-r--r--lib/libatm/ioctl_subr.c56
-rw-r--r--lib/libatm/ip_addr.c15
-rw-r--r--lib/libatm/ip_checksum.c12
-rw-r--r--lib/libatm/libatm.h7
-rw-r--r--lib/libatm/timer.c16
7 files changed, 55 insertions, 87 deletions
diff --git a/lib/libatm/atm_addr.c b/lib/libatm/atm_addr.c
index 102f0b8..36a13f1 100644
--- a/lib/libatm/atm_addr.c
+++ b/lib/libatm/atm_addr.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: atm_addr.c,v 1.1 1998/09/15 08:22:33 phk Exp $
+ * @(#) $Id: atm_addr.c,v 1.2 1999/05/20 23:52:15 mks Exp $
*
*/
@@ -35,14 +35,8 @@
*
*/
-#ifndef lint
-static char *RCSid = "@(#) $Id: atm_addr.c,v 1.1 1998/09/15 08:22:33 phk Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-#include <string.h>
-
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
@@ -53,8 +47,15 @@ static char *RCSid = "@(#) $Id: atm_addr.c,v 1.1 1998/09/15 08:22:33 phk Exp $";
#include <netatm/atm_sys.h>
#include <netatm/atm_ioctl.h>
+#include <stdio.h>
+#include <string.h>
+
#include "libatm.h"
+#ifndef lint
+__RCSID("@(#) $Id: atm_addr.c,v 1.2 1999/05/20 23:52:15 mks Exp $");
+#endif
+
extern char *prog;
@@ -78,7 +79,7 @@ get_hex_atm_addr(in, out, len)
u_char *out;
int len;
{
- int c_type, c_value, i, out_len, state, val;
+ int c_type, c_value, i, out_len, state, val = 0;
/*
* Character table
@@ -284,7 +285,7 @@ format_atm_addr(addr)
case T_ATM_E164_ADDR:
atm_e164 = (Atm_addr_e164 *)addr->address;
for(i=0; i<addr->address_length; i++) {
- sprintf(&str[strlen(str)], "%c\0",
+ sprintf(&str[strlen(str)], "%c",
atm_e164->aae_addr[i]);
}
break;
diff --git a/lib/libatm/cache_key.c b/lib/libatm/cache_key.c
index f0d6650..df0328b 100644
--- a/lib/libatm/cache_key.c
+++ b/lib/libatm/cache_key.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: cache_key.c,v 1.1 1998/07/09 21:45:27 johnc Exp $
+ * @(#) $Id: cache_key.c,v 1.1 1998/09/15 08:22:33 phk Exp $
*
*/
@@ -36,14 +36,8 @@
*
*/
-
-#ifndef lint
-static char *RCSid = "@(#) $Id: cache_key.c,v 1.1 1998/07/09 21:45:27 johnc Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
@@ -55,8 +49,14 @@ static char *RCSid = "@(#) $Id: cache_key.c,v 1.1 1998/07/09 21:45:27 johnc Exp
#include <netatm/atm_ioctl.h>
#include <md5.h>
+#include <string.h>
+
#include "libatm.h"
+#ifndef lint
+__RCSID("@(#) $Id: cache_key.c,v 1.1 1998/09/15 08:22:33 phk Exp $");
+#endif
+
/*
* Compute an SCSP cache key
@@ -78,8 +78,7 @@ scsp_cache_key(ap, ip, ol, op)
int ol;
char *op;
{
- int i, key, len;
- char *cp;
+ int i, len;
char buff[32], digest[16];
MD5_CTX context;
diff --git a/lib/libatm/ioctl_subr.c b/lib/libatm/ioctl_subr.c
index a77d79f..1cf598a 100644
--- a/lib/libatm/ioctl_subr.c
+++ b/lib/libatm/ioctl_subr.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: ioctl_subr.c,v 1.2 1998/07/10 17:09:20 root Exp $
+ * @(#) $Id: ioctl_subr.c,v 1.1 1998/09/15 08:22:34 phk Exp $
*
*/
@@ -35,14 +35,8 @@
*
*/
-#ifndef lint
-static char *RCSid = "@(#) $Id: ioctl_subr.c,v 1.2 1998/07/10 17:09:20 root Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-
-#include <errno.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <net/if.h>
@@ -54,8 +48,18 @@ static char *RCSid = "@(#) $Id: ioctl_subr.c,v 1.2 1998/07/10 17:09:20 root Exp
#include <netatm/atm_sys.h>
#include <netatm/atm_ioctl.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
#include "libatm.h"
+#ifndef lint
+__RCSID("@(#) $Id: ioctl_subr.c,v 1.1 1998/09/15 08:22:34 phk Exp $");
+#endif
+
+
#ifndef TRUE
#define TRUE 1
#endif
@@ -178,43 +182,6 @@ get_vcc_info(intf, vccp)
/*
- * Count number of open VCCs
- *
- * Issue a AIOCS_INF_VCC to get info on all open VCCs. Count them and
- * return the answer.
- *
- * Arguments:
- * intf pointer to interface name (or null string)
- *
- * Returns:
- * int number of VCCs
- *
- */
-int
-count_vccs ( intf )
-char *intf;
-{
- int vcc_info_len;
- int count = 0;
- char *cp;
- struct air_vcc_rsp *vcc_info, *vcc_info_base;
-
- vcc_info_len = get_vcc_info ( intf, &vcc_info );
- if ( !vcc_info )
- return ( 0 );
- vcc_info_base = vcc_info;
-
- for ( ; vcc_info_len >= sizeof ( struct air_vcc_rsp );
- vcc_info_len -= sizeof ( struct air_vcc_rsp ),
- vcc_info++ ) {
- count++;
- }
- free ( vcc_info_base );
- return ( count );
-}
-
-
-/*
* Get subnet mask
*
* Arguments:
@@ -342,7 +309,6 @@ verify_nif_name(name)
char *name;
{
int rc, s;
- caddr_t buf;
struct atminfreq air;
struct air_netif_rsp *nif_info;
diff --git a/lib/libatm/ip_addr.c b/lib/libatm/ip_addr.c
index aee3368..fbf60c4 100644
--- a/lib/libatm/ip_addr.c
+++ b/lib/libatm/ip_addr.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: ip_addr.c,v 1.1 1998/07/09 21:45:42 johnc Exp $
+ * @(#) $Id: ip_addr.c,v 1.1 1998/09/15 08:22:34 phk Exp $
*
*/
@@ -35,14 +35,8 @@
*
*/
-#ifndef lint
-static char *RCSid = "@(#) $Id: ip_addr.c,v 1.1 1998/07/09 21:45:42 johnc Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-
-#include <netdb.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
@@ -54,8 +48,15 @@ static char *RCSid = "@(#) $Id: ip_addr.c,v 1.1 1998/07/09 21:45:42 johnc Exp $"
#include <netatm/atm_sys.h>
#include <netatm/atm_ioctl.h>
+#include <netdb.h>
+#include <string.h>
+
#include "libatm.h"
+#ifndef lint
+__RCSID("@(#) $Id: ip_addr.c,v 1.1 1998/09/15 08:22:34 phk Exp $");
+#endif
+
/*
* Get IP address
diff --git a/lib/libatm/ip_checksum.c b/lib/libatm/ip_checksum.c
index 478f6ca..3cdf2f2 100644
--- a/lib/libatm/ip_checksum.c
+++ b/lib/libatm/ip_checksum.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: ip_checksum.c,v 1.4 1998/08/11 18:11:48 johnc Exp $
+ * @(#) $Id: ip_checksum.c,v 1.1 1998/09/15 08:22:34 phk Exp $
*
*/
@@ -36,14 +36,8 @@
*
*/
-
-#ifndef lint
-static char *RCSid = "@(#) $Id: ip_checksum.c,v 1.4 1998/08/11 18:11:48 johnc Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
@@ -56,6 +50,10 @@ static char *RCSid = "@(#) $Id: ip_checksum.c,v 1.4 1998/08/11 18:11:48 johnc Ex
#include "libatm.h"
+#ifndef lint
+__RCSID("@(#) $Id: ip_checksum.c,v 1.1 1998/09/15 08:22:34 phk Exp $");
+#endif
+
/*
* Compute an IP checksum
diff --git a/lib/libatm/libatm.h b/lib/libatm/libatm.h
index 3462431..28ddbc2 100644
--- a/lib/libatm/libatm.h
+++ b/lib/libatm/libatm.h
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: libatm.h,v 1.5 1998/08/06 16:56:27 johnc Exp $
+ * @(#) $Id: libatm.h,v 1.1 1998/09/15 08:22:34 phk Exp $
*
*/
@@ -96,8 +96,9 @@ extern int get_subnet_mask __P((char *,
struct sockaddr_in *));
extern int get_mtu __P((char *));
extern int verify_nif_name __P((char *));
-extern int get_cfg_info __P((char *,
- struct air_cfg_rsp **));
+extern int get_cfg_info __P((char *, struct air_cfg_rsp **));
+extern int get_intf_info __P((char *, struct air_int_rsp **));
+extern int get_netif_info __P((char *, struct air_netif_rsp **));
/* ip_addr.c */
extern struct sockaddr_in *get_ip_addr __P((char *));
diff --git a/lib/libatm/timer.c b/lib/libatm/timer.c
index fc8b64f..d2bae91 100644
--- a/lib/libatm/timer.c
+++ b/lib/libatm/timer.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: timer.c,v 1.4 1998/07/16 15:50:26 johnc Exp $
+ * @(#) $Id: timer.c,v 1.1 1998/09/15 08:22:34 phk Exp $
*
*/
@@ -35,14 +35,8 @@
*
*/
-#ifndef lint
-static char *RCSid = "@(#) $Id: timer.c,v 1.4 1998/07/16 15:50:26 johnc Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-
-#include <errno.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
@@ -54,8 +48,16 @@ static char *RCSid = "@(#) $Id: timer.c,v 1.4 1998/07/16 15:50:26 johnc Exp $";
#include <netatm/atm_sys.h>
#include <netatm/atm_ioctl.h>
+#include <errno.h>
+#include <signal.h>
+
#include "libatm.h"
+#ifndef lint
+__RCSID("@(#) $Id: timer.c,v 1.1 1998/09/15 08:22:34 phk Exp $");
+#endif
+
+
Harp_timer *harp_timer_head;
int harp_timer_exec;
OpenPOWER on IntegriCloud