Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src minimal ansification/constification
details: https://anonhg.NetBSD.org/src/rev/332ee317a333
branches: trunk
changeset: 757679:332ee317a333
user: drochner <drochner%NetBSD.org@localhost>
date: Sun Sep 12 16:03:39 2010 +0000
description:
minimal ansification/constification
diffstat:
dist/pppd/pppd/eap.c | 29 +++++++++--------------------
sbin/fsck_ffs/fsck.h | 14 +++++++-------
2 files changed, 16 insertions(+), 27 deletions(-)
diffs (111 lines):
diff -r 3d7cf8f51f6a -r 332ee317a333 dist/pppd/pppd/eap.c
--- a/dist/pppd/pppd/eap.c Sun Sep 12 05:00:21 2010 +0000
+++ b/dist/pppd/pppd/eap.c Sun Sep 12 16:03:39 2010 +0000
@@ -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;
diff -r 3d7cf8f51f6a -r 332ee317a333 sbin/fsck_ffs/fsck.h
--- a/sbin/fsck_ffs/fsck.h Sun Sep 12 05:00:21 2010 +0000
+++ b/sbin/fsck_ffs/fsck.h Sun Sep 12 16:03:39 2010 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index