Module Name: src
Committed By: joerg
Date: Tue Aug 30 19:49:11 UTC 2011
Modified Files:
src/usr.sbin/mopd/common: cmp.h common.h device.c device.h dl.h file.c
get.h log.h loop-bsd.c mopdef.c nma.c nma.h pf.h print.h put.h rc.h
src/usr.sbin/mopd/mopchk: mopchk.c
src/usr.sbin/mopd/mopcopy: mopcopy.c
src/usr.sbin/mopd/mopd: mopd.c process.h
src/usr.sbin/mopd/mopprobe: mopprobe.c
src/usr.sbin/mopd/moptrace: moptrace.c
Log Message:
ANSIfy + __printflike + __dead
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/mopd/common/cmp.h \
src/usr.sbin/mopd/common/device.h src/usr.sbin/mopd/common/dl.h \
src/usr.sbin/mopd/common/nma.h src/usr.sbin/mopd/common/pf.h \
src/usr.sbin/mopd/common/print.h src/usr.sbin/mopd/common/put.h \
src/usr.sbin/mopd/common/rc.h
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/mopd/common/common.h
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/mopd/common/device.c
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/mopd/common/file.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/mopd/common/get.h \
src/usr.sbin/mopd/common/nma.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/mopd/common/log.h
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/mopd/common/loop-bsd.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/mopd/common/mopdef.c
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/mopd/mopchk/mopchk.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/mopd/mopcopy/mopcopy.c
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/mopd/mopd/mopd.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/mopd/mopd/process.h
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/mopd/mopprobe/mopprobe.c
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/mopd/moptrace/moptrace.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/mopd/common/cmp.h
diff -u src/usr.sbin/mopd/common/cmp.h:1.6 src/usr.sbin/mopd/common/cmp.h:1.7
--- src/usr.sbin/mopd/common/cmp.h:1.6 Tue Nov 17 18:58:07 2009
+++ src/usr.sbin/mopd/common/cmp.h Tue Aug 30 19:49:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: cmp.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: cmp.h,v 1.7 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $NetBSD: cmp.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
+ * $NetBSD: cmp.h,v 1.7 2011/08/30 19:49:10 joerg Exp $
*
*/
@@ -31,7 +31,7 @@
#define _CMP_H_
__BEGIN_DECLS
-int mopCmpEAddr __P((const u_char *, const u_char *));
+int mopCmpEAddr(const u_char *, const u_char *);
__END_DECLS
#endif /* _CMP_H_ */
Index: src/usr.sbin/mopd/common/device.h
diff -u src/usr.sbin/mopd/common/device.h:1.6 src/usr.sbin/mopd/common/device.h:1.7
--- src/usr.sbin/mopd/common/device.h:1.6 Tue Nov 17 18:58:07 2009
+++ src/usr.sbin/mopd/common/device.h Tue Aug 30 19:49:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: device.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: device.h,v 1.7 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $NetBSD: device.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
+ * $NetBSD: device.h,v 1.7 2011/08/30 19:49:10 joerg Exp $
*
*/
@@ -32,17 +32,17 @@
__BEGIN_DECLS
#ifdef DEV_NEW_CONF
-void deviceEthAddr __P((const char *, u_char *));
+void deviceEthAddr(const char *, u_char *);
#endif
-void deviceInitOne __P((const char *));
-void deviceInitAll __P((void));
+void deviceInitOne(const char *);
+void deviceInitAll(void);
/* from loop-bsd.c */
-void Loop __P((void));
-int mopOpenDL __P((struct if_info *, int));
-int mopOpenRC __P((struct if_info *, int));
-void mopReadDL __P((void));
-void mopReadRC __P((void));
+__dead void Loop(void);
+int mopOpenDL(struct if_info *, int);
+int mopOpenRC(struct if_info *, int);
+void mopReadDL(void);
+void mopReadRC(void);
__END_DECLS
#endif /* _DEVICE_H_ */
Index: src/usr.sbin/mopd/common/dl.h
diff -u src/usr.sbin/mopd/common/dl.h:1.6 src/usr.sbin/mopd/common/dl.h:1.7
--- src/usr.sbin/mopd/common/dl.h:1.6 Tue Nov 17 18:58:07 2009
+++ src/usr.sbin/mopd/common/dl.h Tue Aug 30 19:49:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: dl.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: dl.h,v 1.7 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $NetBSD: dl.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
+ * $NetBSD: dl.h,v 1.7 2011/08/30 19:49:10 joerg Exp $
*
*/
@@ -31,7 +31,7 @@
#define _DL_H_
__BEGIN_DECLS
-void mopDumpDL __P((FILE *, const u_char *, int));
+void mopDumpDL(FILE *, const u_char *, int);
__END_DECLS
#endif /* _DL_H_ */
Index: src/usr.sbin/mopd/common/nma.h
diff -u src/usr.sbin/mopd/common/nma.h:1.6 src/usr.sbin/mopd/common/nma.h:1.7
--- src/usr.sbin/mopd/common/nma.h:1.6 Tue Oct 20 00:51:13 2009
+++ src/usr.sbin/mopd/common/nma.h Tue Aug 30 19:49:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: nma.h,v 1.6 2009/10/20 00:51:13 snj Exp $ */
+/* $NetBSD: nma.h,v 1.7 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1995 Mats O Jansson. All rights reserved.
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $NetBSD: nma.h,v 1.6 2009/10/20 00:51:13 snj Exp $
+ * $NetBSD: nma.h,v 1.7 2011/08/30 19:49:11 joerg Exp $
*
*/
@@ -31,8 +31,8 @@
#define _NMA_H_
__BEGIN_DECLS
-const char *nmaGetShort __P((int));
-const char *nmaGetDevice __P((int));
+const char *nmaGetShort(int);
+const char *nmaGetDevice(int);
__END_DECLS
#endif /* _NMA_H_ */
Index: src/usr.sbin/mopd/common/pf.h
diff -u src/usr.sbin/mopd/common/pf.h:1.6 src/usr.sbin/mopd/common/pf.h:1.7
--- src/usr.sbin/mopd/common/pf.h:1.6 Tue Nov 17 18:58:07 2009
+++ src/usr.sbin/mopd/common/pf.h Tue Aug 30 19:49:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pf.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: pf.h,v 1.7 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $NetBSD: pf.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
+ * $NetBSD: pf.h,v 1.7 2011/08/30 19:49:11 joerg Exp $
*
*/
@@ -31,13 +31,13 @@
#define _PF_H_
__BEGIN_DECLS
-int pfTrans __P((const char *));
-int pfInit __P((const char *, int, u_short, int));
-int pfEthAddr __P((int, u_char *));
-int pfAddMulti __P((int, const char *, const char *));
-int pfDelMulti __P((int, const char *, const char *));
-int pfRead __P((int, u_char *, int));
-int pfWrite __P((int, const u_char *, int, int));
+int pfTrans(const char *);
+int pfInit(const char *, int, u_short, int);
+int pfEthAddr(int, u_char *);
+int pfAddMulti(int, const char *, const char *);
+int pfDelMulti(int, const char *, const char *);
+int pfRead(int, u_char *, int);
+int pfWrite(int, const u_char *, int, int);
__END_DECLS
#endif /* _PF_H_ */
Index: src/usr.sbin/mopd/common/print.h
diff -u src/usr.sbin/mopd/common/print.h:1.6 src/usr.sbin/mopd/common/print.h:1.7
--- src/usr.sbin/mopd/common/print.h:1.6 Tue Nov 17 18:58:07 2009
+++ src/usr.sbin/mopd/common/print.h Tue Aug 30 19:49:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: print.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: print.h,v 1.7 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $NetBSD: print.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
+ * $NetBSD: print.h,v 1.7 2011/08/30 19:49:11 joerg Exp $
*
*/
@@ -31,16 +31,15 @@
#define _PRINT_H_
__BEGIN_DECLS
-void mopPrintHWA __P((FILE *, const u_char *));
-void mopPrintBPTY __P((FILE *, u_char));
-void mopPrintPGTY __P((FILE *, u_char));
-void mopPrintOneline __P((FILE *, const u_char *, int));
-void mopPrintHeader __P((FILE *, const u_char *, int));
-void mopPrintMopHeader __P((FILE *, const u_char *, int));
-void mopPrintDevice __P((FILE *, u_char));
-void mopPrintTime __P((FILE *, const u_char *));
-void mopPrintInfo __P((FILE *, const u_char *, int *, u_short,
- u_char, int));
+void mopPrintHWA(FILE *, const u_char *);
+void mopPrintBPTY(FILE *, u_char);
+void mopPrintPGTY(FILE *, u_char);
+void mopPrintOneline(FILE *, const u_char *, int);
+void mopPrintHeader(FILE *, const u_char *, int);
+void mopPrintMopHeader(FILE *, const u_char *, int);
+void mopPrintDevice(FILE *, u_char);
+void mopPrintTime(FILE *, const u_char *);
+void mopPrintInfo(FILE *, const u_char *, int *, u_short, u_char, int);
__END_DECLS
#endif /* _PRINT_H_ */
Index: src/usr.sbin/mopd/common/put.h
diff -u src/usr.sbin/mopd/common/put.h:1.6 src/usr.sbin/mopd/common/put.h:1.7
--- src/usr.sbin/mopd/common/put.h:1.6 Tue Nov 17 18:58:07 2009
+++ src/usr.sbin/mopd/common/put.h Tue Aug 30 19:49:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: put.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: put.h,v 1.7 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $NetBSD: put.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
+ * $NetBSD: put.h,v 1.7 2011/08/30 19:49:11 joerg Exp $
*
*/
@@ -31,13 +31,13 @@
#define _PUT_H_
__BEGIN_DECLS
-void mopPutChar __P((u_char *, int *, u_char));
-void mopPutShort __P((u_char *, int *, u_short));
-void mopPutLong __P((u_char *, int *, u_int32_t));
-void mopPutMulti __P((u_char *, int *, const u_char *, int));
-void mopPutTime __P((u_char *, int *, time_t));
-void mopPutHeader __P((u_char *, int *, const u_char *, const u_char *, u_short, int));
-void mopPutLength __P((u_char *, int, u_short));
+void mopPutChar(u_char *, int *, u_char);
+void mopPutShort(u_char *, int *, u_short);
+void mopPutLong(u_char *, int *, u_int32_t);
+void mopPutMulti(u_char *, int *, const u_char *, int);
+void mopPutTime(u_char *, int *, time_t);
+void mopPutHeader(u_char *, int *, const u_char *, const u_char *, u_short, int);
+void mopPutLength(u_char *, int, u_short);
__END_DECLS
#endif /* _PUT_H_ */
Index: src/usr.sbin/mopd/common/rc.h
diff -u src/usr.sbin/mopd/common/rc.h:1.6 src/usr.sbin/mopd/common/rc.h:1.7
--- src/usr.sbin/mopd/common/rc.h:1.6 Tue Nov 17 18:58:07 2009
+++ src/usr.sbin/mopd/common/rc.h Tue Aug 30 19:49:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: rc.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: rc.h,v 1.7 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $NetBSD: rc.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
+ * $NetBSD: rc.h,v 1.7 2011/08/30 19:49:11 joerg Exp $
*
*/
@@ -31,7 +31,7 @@
#define _RC_H_
__BEGIN_DECLS
-void mopDumpRC __P((FILE *, const u_char *, int));
+void mopDumpRC(FILE *, const u_char *, int);
__END_DECLS
#endif /* _RC_H_ */
Index: src/usr.sbin/mopd/common/common.h
diff -u src/usr.sbin/mopd/common/common.h:1.8 src/usr.sbin/mopd/common/common.h:1.9
--- src/usr.sbin/mopd/common/common.h:1.8 Tue Nov 17 18:58:07 2009
+++ src/usr.sbin/mopd/common/common.h Tue Aug 30 19:49:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: common.h,v 1.8 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: common.h,v 1.9 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $NetBSD: common.h,v 1.8 2009/11/17 18:58:07 drochner Exp $
+ * $NetBSD: common.h,v 1.9 2011/08/30 19:49:10 joerg Exp $
*
*/
@@ -53,11 +53,11 @@
int trans; /* Transport type Ethernet/802.3 */
u_char eaddr[6]; /* Ethernet addr of this interface */
char if_name[IFNAME_SIZE]; /* Interface Name */
- int (*iopen) __P((const char *, int, u_short, int));
+ int (*iopen)(const char *, int, u_short, int);
/* Interface Open Routine */
- int (*write) __P((int, const u_char *, int, int));
+ int (*write)(int, const u_char *, int, int);
/* Interface Write Routine */
- void (*read) __P((void)); /* Interface Read Routine */
+ void (*read)(void); /* Interface Read Routine */
struct if_info *next; /* Next Interface */
};
Index: src/usr.sbin/mopd/common/device.c
diff -u src/usr.sbin/mopd/common/device.c:1.11 src/usr.sbin/mopd/common/device.c:1.12
--- src/usr.sbin/mopd/common/device.c:1.11 Tue Nov 17 18:58:07 2009
+++ src/usr.sbin/mopd/common/device.c Tue Aug 30 19:49:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: device.c,v 1.11 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: device.c,v 1.12 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: device.c,v 1.11 2009/11/17 18:58:07 drochner Exp $");
+__RCSID("$NetBSD: device.c,v 1.12 2011/08/30 19:49:10 joerg Exp $");
#endif
#include "os.h"
@@ -218,7 +218,7 @@
* point to point.
*/
void
-deviceInitAll()
+deviceInitAll(void)
{
#ifdef DEV_NEW_CONF
struct sockaddr_dl *sdl;
Index: src/usr.sbin/mopd/common/file.c
diff -u src/usr.sbin/mopd/common/file.c:1.13 src/usr.sbin/mopd/common/file.c:1.14
--- src/usr.sbin/mopd/common/file.c:1.13 Tue Aug 16 16:45:20 2011
+++ src/usr.sbin/mopd/common/file.c Tue Aug 30 19:49:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: file.c,v 1.13 2011/08/16 16:45:20 christos Exp $ */
+/* $NetBSD: file.c,v 1.14 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1995-96 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: file.c,v 1.13 2011/08/16 16:45:20 christos Exp $");
+__RCSID("$NetBSD: file.c,v 1.14 2011/08/30 19:49:10 joerg Exp $");
#endif
#include "os.h"
@@ -58,12 +58,11 @@
# endif
#endif /* NOELF */
-int getCLBYTES __P((int));
-int getMID __P((int, int));
+static int getCLBYTES(int);
+static int getMID(int, int);
const char *
-FileTypeName(type)
- mopd_imagetype type;
+FileTypeName(mopd_imagetype type)
{
switch (type) {
@@ -81,10 +80,7 @@
}
void
-mopFilePutLX(buf, idx, value, cnt)
- u_char *buf;
- int idx, cnt;
- u_int32_t value;
+mopFilePutLX(u_char *buf, int idx, u_int32_t value, int cnt)
{
int i;
for (i = 0; i < cnt; i++) {
@@ -94,10 +90,7 @@
}
void
-mopFilePutBX(buf, idx, value, cnt)
- u_char *buf;
- int idx, cnt;
- u_int32_t value;
+mopFilePutBX(u_char *buf, int idx, u_int32_t value, int cnt)
{
int i;
for (i = 0; i < cnt; i++) {
@@ -107,9 +100,7 @@
}
u_int32_t
-mopFileGetLX(buf, idx, cnt)
- u_char *buf;
- int idx, cnt;
+mopFileGetLX(u_char *buf, int idx, int cnt)
{
u_int32_t ret = 0;
int i;
@@ -125,9 +116,7 @@
}
u_int32_t
-mopFileGetBX(buf, idx, cnt)
- u_char *buf;
- int idx, cnt;
+mopFileGetBX(u_char *buf, int idx, int cnt)
{
u_int32_t ret = 0;
int i;
@@ -143,9 +132,7 @@
}
void
-mopFileSwapX(buf, idx, cnt)
- u_char *buf;
- int idx, cnt;
+mopFileSwapX(u_char *buf, int idx, int cnt)
{
int i;
u_char c;
@@ -159,8 +146,7 @@
}
int
-CheckMopFile(fd)
- int fd;
+CheckMopFile(int fd)
{
u_char header[512];
short image_type;
@@ -190,8 +176,7 @@
}
int
-GetMopFileInfo(dl)
- struct dllist *dl;
+GetMopFileInfo(struct dllist *dl)
{
u_char header[512];
short image_type;
@@ -302,9 +287,8 @@
}
#ifndef NOAOUT
-int
-getMID(old_mid,new_mid)
- int old_mid, new_mid;
+static int
+getMID(int old_mid, int new_mid)
{
int mid;
@@ -364,9 +348,8 @@
return(mid);
}
-int
-getCLBYTES(mid)
- int mid;
+static int
+getCLBYTES(int mid)
{
int clbytes;
@@ -421,8 +404,7 @@
#endif
int
-CheckElfFile(fd)
- int fd;
+CheckElfFile(int fd)
{
#ifdef NOELF
return(-1);
@@ -449,8 +431,7 @@
}
int
-GetElfFileInfo(dl)
- struct dllist *dl;
+GetElfFileInfo(struct dllist *dl)
{
#ifdef NOELF
return(-1);
@@ -633,8 +614,7 @@
}
int
-CheckAOutFile(fd)
- int fd;
+CheckAOutFile(int fd)
{
#ifdef NOAOUT
return(-1);
@@ -667,8 +647,7 @@
}
int
-GetAOutFileInfo(dl)
- struct dllist *dl;
+GetAOutFileInfo(struct dllist *dl)
{
#ifdef NOAOUT
return(-1);
@@ -869,8 +848,7 @@
}
int
-GetFileInfo(dl)
- struct dllist *dl;
+GetFileInfo(struct dllist *dl)
{
int error;
@@ -906,9 +884,7 @@
}
ssize_t
-mopFileRead(dlslot, buf)
- struct dllist *dlslot;
- u_char *buf;
+mopFileRead(struct dllist *dlslot, u_char *buf)
{
ssize_t len, outlen;
int bsz, sec;
Index: src/usr.sbin/mopd/common/get.h
diff -u src/usr.sbin/mopd/common/get.h:1.5 src/usr.sbin/mopd/common/get.h:1.6
--- src/usr.sbin/mopd/common/get.h:1.5 Tue Nov 17 18:58:07 2009
+++ src/usr.sbin/mopd/common/get.h Tue Aug 30 19:49:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: get.h,v 1.5 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: get.h,v 1.6 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $NetBSD: get.h,v 1.5 2009/11/17 18:58:07 drochner Exp $
+ * $NetBSD: get.h,v 1.6 2011/08/30 19:49:10 joerg Exp $
*
*/
@@ -31,14 +31,14 @@
#define _GET_H_
__BEGIN_DECLS
-u_char mopGetChar __P((const u_char *, int *));
-u_short mopGetShort __P((const u_char *, int *));
-u_int32_t mopGetLong __P((const u_char *, int *));
-void mopGetMulti __P((const u_char *, int *, u_char *, int));
-int mopGetTrans __P((const u_char *, int));
-void mopGetHeader __P((const u_char *, int *, const u_char **, const u_char **,
- u_short *, int *, int));
-u_short mopGetLength __P((const u_char *, int));
+u_char mopGetChar(const u_char *, int *);
+u_short mopGetShort(const u_char *, int *);
+u_int32_t mopGetLong(const u_char *, int *);
+void mopGetMulti(const u_char *, int *, u_char *, int);
+int mopGetTrans(const u_char *, int);
+void mopGetHeader(const u_char *, int *, const u_char **, const u_char **,
+ u_short *, int *, int);
+u_short mopGetLength(const u_char *, int);
__END_DECLS
#endif /* _GET_H_ */
Index: src/usr.sbin/mopd/common/nma.c
diff -u src/usr.sbin/mopd/common/nma.c:1.5 src/usr.sbin/mopd/common/nma.c:1.6
--- src/usr.sbin/mopd/common/nma.c:1.5 Tue Oct 20 00:51:13 2009
+++ src/usr.sbin/mopd/common/nma.c Tue Aug 30 19:49:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: nma.c,v 1.5 2009/10/20 00:51:13 snj Exp $ */
+/* $NetBSD: nma.c,v 1.6 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1995 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: nma.c,v 1.5 2009/10/20 00:51:13 snj Exp $");
+__RCSID("$NetBSD: nma.c,v 1.6 2011/08/30 19:49:11 joerg Exp $");
#endif
#include "os.h"
@@ -188,8 +188,7 @@
};
const char *
-nmaGetShort(devno)
- int devno;
+nmaGetShort(int devno)
{
struct commDev *current;
@@ -205,8 +204,7 @@
}
const char *
-nmaGetDevice(devno)
- int devno;
+nmaGetDevice(int devno)
{
struct commDev *current;
Index: src/usr.sbin/mopd/common/log.h
diff -u src/usr.sbin/mopd/common/log.h:1.2 src/usr.sbin/mopd/common/log.h:1.3
--- src/usr.sbin/mopd/common/log.h:1.2 Mon Apr 28 20:24:17 2008
+++ src/usr.sbin/mopd/common/log.h Tue Aug 30 19:49:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: log.h,v 1.2 2008/04/28 20:24:17 martin Exp $ */
+/* $NetBSD: log.h,v 1.3 2011/08/30 19:49:10 joerg Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -34,14 +34,10 @@
__BEGIN_DECLS
extern int mopInteractive;
-void mopLogErr __P((const char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
-void mopLogErrX __P((const char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
-void mopLogWarn __P((const char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
-void mopLogWarnX __P((const char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
+void mopLogErr(const char *, ...) __dead __printflike(1, 2);
+void mopLogErrX(const char *, ...) __dead __printflike(1, 2);
+void mopLogWarn(const char *, ...) __printflike(1, 2);
+void mopLogWarnX(const char *, ...) __printflike(1, 2);
__END_DECLS
#endif /* _LOG_H_ */
Index: src/usr.sbin/mopd/common/loop-bsd.c
diff -u src/usr.sbin/mopd/common/loop-bsd.c:1.10 src/usr.sbin/mopd/common/loop-bsd.c:1.11
--- src/usr.sbin/mopd/common/loop-bsd.c:1.10 Tue Oct 20 00:51:13 2009
+++ src/usr.sbin/mopd/common/loop-bsd.c Tue Aug 30 19:49:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: loop-bsd.c,v 1.10 2009/10/20 00:51:13 snj Exp $ */
+/* $NetBSD: loop-bsd.c,v 1.11 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: loop-bsd.c,v 1.10 2009/10/20 00:51:13 snj Exp $");
+__RCSID("$NetBSD: loop-bsd.c,v 1.11 2011/08/30 19:49:10 joerg Exp $");
#endif
#include <errno.h>
@@ -48,9 +48,7 @@
#include "log.h"
int
-mopOpenRC(p, trans)
- struct if_info *p;
- int trans;
+mopOpenRC(struct if_info *p, int trans)
{
#ifndef NORC
return (*(p->iopen))(p->if_name,
@@ -63,9 +61,7 @@
}
int
-mopOpenDL(p, trans)
- struct if_info *p;
- int trans;
+mopOpenDL(struct if_info *p, int trans)
{
#ifndef NODL
return (*(p->iopen))(p->if_name,
@@ -78,12 +74,12 @@
}
void
-mopReadRC()
+mopReadRC(void)
{
}
void
-mopReadDL()
+mopReadDL(void)
{
}
@@ -93,14 +89,14 @@
*/
struct if_info *iflist;
-void mopProcess __P((struct if_info *, u_char *));
+void mopProcess(struct if_info *, u_char *);
/*
* Loop indefinitely listening for MOP requests on the
* interfaces in 'iflist'.
*/
void
-Loop()
+Loop(void)
{
u_char *buf, *bp, *ep;
int cc, n, m;
Index: src/usr.sbin/mopd/common/mopdef.c
diff -u src/usr.sbin/mopd/common/mopdef.c:1.4 src/usr.sbin/mopd/common/mopdef.c:1.5
--- src/usr.sbin/mopd/common/mopdef.c:1.4 Tue Oct 20 00:51:13 2009
+++ src/usr.sbin/mopd/common/mopdef.c Tue Aug 30 19:49:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mopdef.c,v 1.4 2009/10/20 00:51:13 snj Exp $ */
+/* $NetBSD: mopdef.c,v 1.5 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1995 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mopdef.c,v 1.4 2009/10/20 00:51:13 snj Exp $");
+__RCSID("$NetBSD: mopdef.c,v 1.5 2011/08/30 19:49:10 joerg Exp $");
#endif
#define MOPDEF_SURPESS_EXTERN
@@ -40,7 +40,7 @@
#if 0
int
-mopdef_dummy()
+mopdef_dummy(void)
{
/* Just to keep them as variables */
return(dl_mcst[0]-rc_mcst[0]-
Index: src/usr.sbin/mopd/mopchk/mopchk.c
diff -u src/usr.sbin/mopd/mopchk/mopchk.c:1.12 src/usr.sbin/mopd/mopchk/mopchk.c:1.13
--- src/usr.sbin/mopd/mopchk/mopchk.c:1.12 Tue Oct 20 00:51:13 2009
+++ src/usr.sbin/mopd/mopchk/mopchk.c Tue Aug 30 19:49:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mopchk.c,v 1.12 2009/10/20 00:51:13 snj Exp $ */
+/* $NetBSD: mopchk.c,v 1.13 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1995-96 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mopchk.c,v 1.12 2009/10/20 00:51:13 snj Exp $");
+__RCSID("$NetBSD: mopchk.c,v 1.13 2011/08/30 19:49:11 joerg Exp $");
#endif
/*
@@ -49,9 +49,8 @@
*/
struct if_info *iflist;
-void Usage __P((void));
-int main __P((int, char **));
-void mopProcess __P((struct if_info *, u_char *));
+__dead static void Usage(void);
+void mopProcess(struct if_info *, u_char *);
int AllFlag = 0; /* listen on "all" interfaces */
int VersionFlag = 0; /* Show version */
@@ -60,9 +59,7 @@
extern char version[];
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
struct dllist dl;
int op, i;
@@ -143,8 +140,8 @@
return (0);
}
-void
-Usage()
+static void
+Usage(void)
{
(void) fprintf(stderr, "usage: %s [-a] [-v] [filename...]\n",
getprogname());
@@ -156,8 +153,6 @@
* Doesn't actually do anything for mopchk(1)
*/
void
-mopProcess(ii, pkt)
- struct if_info *ii;
- u_char *pkt;
+mopProcess(struct if_info *ii, u_char *pkt)
{
}
Index: src/usr.sbin/mopd/mopcopy/mopcopy.c
diff -u src/usr.sbin/mopd/mopcopy/mopcopy.c:1.4 src/usr.sbin/mopd/mopcopy/mopcopy.c:1.5
--- src/usr.sbin/mopd/mopcopy/mopcopy.c:1.4 Thu Aug 20 22:26:19 2009
+++ src/usr.sbin/mopd/mopcopy/mopcopy.c Tue Aug 30 19:49:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mopcopy.c,v 1.4 2009/08/20 22:26:19 he Exp $ */
+/* $NetBSD: mopcopy.c,v 1.5 2011/08/30 19:49:11 joerg Exp $ */
/* mopcopy - Convert a Unix format kernel into something that
* can be transfered via MOP.
@@ -49,7 +49,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mopcopy.c,v 1.4 2009/08/20 22:26:19 he Exp $");
+__RCSID("$NetBSD: mopcopy.c,v 1.5 2011/08/30 19:49:11 joerg Exp $");
#endif
#include "os.h"
@@ -89,7 +89,7 @@
#endif
int
-main (int argc, char **argv)
+main(int argc, char **argv)
{
FILE *out; /* A FILE because that is easier. */
int i, j;
Index: src/usr.sbin/mopd/mopd/mopd.c
diff -u src/usr.sbin/mopd/mopd/mopd.c:1.13 src/usr.sbin/mopd/mopd/mopd.c:1.14
--- src/usr.sbin/mopd/mopd/mopd.c:1.13 Tue Nov 17 18:58:07 2009
+++ src/usr.sbin/mopd/mopd/mopd.c Tue Aug 30 19:49:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mopd.c,v 1.13 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: mopd.c,v 1.14 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-96 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mopd.c,v 1.13 2009/11/17 18:58:07 drochner Exp $");
+__RCSID("$NetBSD: mopd.c,v 1.14 2011/08/30 19:49:11 joerg Exp $");
#endif
/*
@@ -56,9 +56,8 @@
*/
struct if_info *iflist;
-void Usage __P((void));
-int main __P((int, char **));
-void mopProcess __P((struct if_info *, u_char *));
+__dead static void Usage(void);
+void mopProcess(struct if_info *, u_char *);
int AllFlag = 0; /* listen on "all" interfaces */
int DebugFlag = 0; /* print debugging messages */
@@ -70,9 +69,7 @@
const char *MopdDir = MOP_FILE_PATH; /* Path to mop directory */
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
int c, pid;
@@ -155,8 +152,8 @@
return (0);
}
-void
-Usage()
+static void
+Usage(void)
{
(void) fprintf(stderr, "usage: %s -a [ -d -f -v ] [ -3 | -4 ]\n",
getprogname());
@@ -170,9 +167,7 @@
* Process incomming packages.
*/
void
-mopProcess(ii, pkt)
- struct if_info *ii;
- u_char *pkt;
+mopProcess(struct if_info *ii, u_char *pkt)
{
const u_char *dst, *src;
u_short ptype;
Index: src/usr.sbin/mopd/mopd/process.h
diff -u src/usr.sbin/mopd/mopd/process.h:1.6 src/usr.sbin/mopd/mopd/process.h:1.7
--- src/usr.sbin/mopd/mopd/process.h:1.6 Tue Nov 17 18:58:07 2009
+++ src/usr.sbin/mopd/mopd/process.h Tue Aug 30 19:49:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: process.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
+/* $NetBSD: process.h,v 1.7 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $NetBSD: process.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
+ * $NetBSD: process.h,v 1.7 2011/08/30 19:49:11 joerg Exp $
*
*/
@@ -31,10 +31,10 @@
#define _PROCESS_H_
__BEGIN_DECLS
-void mopProcessDL __P((FILE *, struct if_info *, u_char *, int *,
- const u_char *, const u_char *, int, u_short));
-void mopProcessRC __P((FILE *, struct if_info *, u_char *, int *,
- const u_char *, const u_char *, int, u_short));
+void mopProcessDL(FILE *, struct if_info *, u_char *, int *,
+ const u_char *, const u_char *, int, u_short);
+void mopProcessRC(FILE *, struct if_info *, u_char *, int *,
+ const u_char *, const u_char *, int, u_short);
__END_DECLS
#endif /* _PROCESS_H_ */
Index: src/usr.sbin/mopd/mopprobe/mopprobe.c
diff -u src/usr.sbin/mopd/mopprobe/mopprobe.c:1.10 src/usr.sbin/mopd/mopprobe/mopprobe.c:1.11
--- src/usr.sbin/mopd/mopprobe/mopprobe.c:1.10 Tue Oct 20 00:51:13 2009
+++ src/usr.sbin/mopd/mopprobe/mopprobe.c Tue Aug 30 19:49:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mopprobe.c,v 1.10 2009/10/20 00:51:13 snj Exp $ */
+/* $NetBSD: mopprobe.c,v 1.11 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-96 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mopprobe.c,v 1.10 2009/10/20 00:51:13 snj Exp $");
+__RCSID("$NetBSD: mopprobe.c,v 1.11 2011/08/30 19:49:11 joerg Exp $");
#endif
/*
@@ -53,9 +53,8 @@
*/
struct if_info *iflist;
-void Usage __P((void));
-int main __P((int, char **));
-void mopProcess __P((struct if_info *, u_char *));
+__dead static void Usage(void);
+void mopProcess(struct if_info *, u_char *);
int AllFlag = 0; /* listen on "all" interfaces */
int DebugFlag = 0; /* print debugging messages */
@@ -65,9 +64,7 @@
int promisc = 1; /* Need promisc mode */
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
int op;
char *interface;
@@ -115,8 +112,8 @@
return (0);
}
-void
-Usage()
+static void
+Usage(void)
{
(void) fprintf(stderr, "usage: %s -a [ -3 | -4 ]\n", getprogname());
(void) fprintf(stderr, " %s [ -3 | -4 ] interface\n",
@@ -128,9 +125,7 @@
* Process incomming packages.
*/
void
-mopProcess(ii, pkt)
- struct if_info *ii;
- u_char *pkt;
+mopProcess(struct if_info *ii, u_char *pkt)
{
u_char *dst, *src, *p, mopcode, tmpc, ilen;
u_short *ptype, moplen, tmps, itype, len;
Index: src/usr.sbin/mopd/moptrace/moptrace.c
diff -u src/usr.sbin/mopd/moptrace/moptrace.c:1.10 src/usr.sbin/mopd/moptrace/moptrace.c:1.11
--- src/usr.sbin/mopd/moptrace/moptrace.c:1.10 Tue Oct 20 00:51:14 2009
+++ src/usr.sbin/mopd/moptrace/moptrace.c Tue Aug 30 19:49:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: moptrace.c,v 1.10 2009/10/20 00:51:14 snj Exp $ */
+/* $NetBSD: moptrace.c,v 1.11 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: moptrace.c,v 1.10 2009/10/20 00:51:14 snj Exp $");
+__RCSID("$NetBSD: moptrace.c,v 1.11 2011/08/30 19:49:11 joerg Exp $");
#endif
/*
@@ -53,9 +53,8 @@
*/
struct if_info *iflist;
-void Usage __P((void));
-int main __P((int, char **));
-void mopProcess __P((struct if_info *, u_char *));
+__dead static void Usage(void);
+void mopProcess(struct if_info *, u_char *);
int AllFlag = 0; /* listen on "all" interfaces */
int DebugFlag = 0; /* print debugging messages */
@@ -64,9 +63,7 @@
int promisc = 1; /* Need promisc mode */
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
int op;
char *interface;
@@ -110,8 +107,8 @@
return (0);
}
-void
-Usage()
+static void
+Usage(void)
{
(void) fprintf(stderr, "usage: %s -a [ -d ] [ -3 | -4 ]\n",
getprogname());
@@ -124,9 +121,7 @@
* Process incoming packages.
*/
void
-mopProcess(ii, pkt)
- struct if_info *ii;
- u_char *pkt;
+mopProcess(struct if_info *ii, u_char *pkt)
{
int trans;