Module Name: src
Committed By: drochner
Date: Sun Sep 12 16:03:39 UTC 2010
Modified Files:
src/dist/pppd/pppd: eap.c
src/sbin/fsck_ffs: fsck.h
Log Message:
minimal ansification/constification
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/dist/pppd/pppd/eap.c
cvs rdiff -u -r1.47 -r1.48 src/sbin/fsck_ffs/fsck.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/dist/pppd/pppd/eap.c
diff -u src/dist/pppd/pppd/eap.c:1.2 src/dist/pppd/pppd/eap.c:1.3
--- src/dist/pppd/pppd/eap.c:1.2 Sun Feb 20 10:47:17 2005
+++ src/dist/pppd/pppd/eap.c Sun Sep 12 16:03:39 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: eap.c,v 1.2 2005/02/20 10:47:17 cube Exp $ */
+/* $NetBSD: eap.c,v 1.3 2010/09/12 16:03:39 drochner Exp $ */
/*
* eap.c - Extensible Authentication Protocol for PPP (RFC 2284)
@@ -50,7 +50,7 @@
#if 0
#define RCSID "Id: eap.c,v 1.4 2004/11/09 22:39:25 paulus Exp"
#else
-__RCSID("$NetBSD: eap.c,v 1.2 2005/02/20 10:47:17 cube Exp $");
+__RCSID("$NetBSD: eap.c,v 1.3 2010/09/12 16:03:39 drochner Exp $");
#endif
#endif
@@ -198,8 +198,8 @@
static void eap_send_request __P((eap_state *));
static void eap_rechallenge __P((void *));
static void srp_lwrechallenge __P((void *));
-static void eap_send_response __P((eap_state *, u_char, u_char, u_char *, int));
-static void eap_chap_response __P((eap_state *, u_char, u_char *, char *, int));
+static void eap_send_response __P((eap_state *, u_char, u_char, const u_char *, int));
+static void eap_chap_response __P((eap_state *, u_char, const u_char *, const char *, int));
static void eap_send_nak __P((eap_state *,u_char,u_char));
static void eap_request __P((eap_state *, u_char *, int, int));
static void eap_response __P((eap_state *, u_char *, int, int));
@@ -1065,12 +1065,8 @@
* Format and send a regular EAP Response message.
*/
static void
-eap_send_response(esp, id, typenum, str, lenstr)
-eap_state *esp;
-u_char id;
-u_char typenum;
-u_char *str;
-int lenstr;
+eap_send_response(eap_state *esp, u_char id, u_char typenum,
+ const u_char *str, int lenstr)
{
u_char *outp;
int msglen;
@@ -1096,12 +1092,8 @@
* Format and send an MD5-Challenge EAP Response message.
*/
static void
-eap_chap_response(esp, id, hash, name, namelen)
-eap_state *esp;
-u_char id;
-u_char *hash;
-char *name;
-int namelen;
+eap_chap_response(eap_state *esp, u_char id, const u_char *hash,
+ const char *name, int namelen)
{
u_char *outp;
int msglen;
@@ -1193,10 +1185,7 @@
#endif /* USE_SRP */
static void
-eap_send_nak(esp, id, type)
-eap_state *esp;
-u_char id;
-u_char type;
+eap_send_nak(eap_state *esp, u_char id, u_char type)
{
u_char *outp;
int msglen;
Index: src/sbin/fsck_ffs/fsck.h
diff -u src/sbin/fsck_ffs/fsck.h:1.47 src/sbin/fsck_ffs/fsck.h:1.48
--- src/sbin/fsck_ffs/fsck.h:1.47 Thu Oct 9 16:56:23 2008
+++ src/sbin/fsck_ffs/fsck.h Sun Sep 12 16:03:39 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: fsck.h,v 1.47 2008/10/09 16:56:23 christos Exp $ */
+/* $NetBSD: fsck.h,v 1.48 2010/09/12 16:03:39 drochner Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -321,24 +321,24 @@
static inline u_int32_t iswap32 (u_int32_t);
static inline u_int64_t iswap64 (u_int64_t);
-static inline u_int16_t iswap16(x)
- u_int16_t x;
+static inline u_int16_t
+iswap16(u_int16_t x)
{
if (needswap)
return bswap16(x);
else return x;
}
-static inline u_int32_t iswap32(x)
- u_int32_t x;
+static inline u_int32_t
+iswap32(u_int32_t x)
{
if (needswap)
return bswap32(x);
else return x;
}
-static inline u_int64_t iswap64(x)
- u_int64_t x;
+static inline u_int64_t
+iswap64(u_int64_t x)
{
if (needswap)
return bswap64(x);