DragonFly submit List (threaded) for 2004-05
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
ANSIfication for sys/kern/md5c.c, ...
ANSIfication & small cleanup to sys/kern/{md5c.c, subr_autoconf.c,
subr_disk.c}
No fuctional changes.
--- Tim Wickberg
me@xxxxxxxxxxx
--- md5c.old.c 2004-05-26 03:16:46.000000000 +0000
+++ md5c.c 2004-05-26 02:39:59.000000000 +0000
@@ -57,10 +57,7 @@
/* XXX not prototyped, and not compatible with memcpy(). */
static void
-Encode (output, input, len)
- unsigned char *output;
- u_int32_t *input;
- unsigned int len;
+Encode (unsigned char *output, u_int32_t *input, unsigned int len)
{
unsigned int i, j;
@@ -78,10 +75,7 @@
*/
static void
-Decode (output, input, len)
- u_int32_t *output;
- const unsigned char *input;
- unsigned int len;
+Decode (u_int32_t *output, const unsigned char *input, unsigned int len)
{
unsigned int i, j;
@@ -134,8 +128,7 @@
/* MD5 initialization. Begins an MD5 operation, writing a new context. */
void
-MD5Init (context)
- MD5_CTX *context;
+MD5Init (MD5_CTX *context)
{
context->count[0] = context->count[1] = 0;
@@ -154,10 +147,7 @@
*/
void
-MD5Update (context, input, inputLen)
- MD5_CTX *context;
- const unsigned char *input;
- unsigned int inputLen;
+MD5Update (MD5_CTX *context, const unsigned char *input, unsigned int inputLen)
{
unsigned int i, index, partLen;
@@ -196,8 +186,7 @@
*/
void
-MD5Pad (context)
- MD5_CTX *context;
+MD5Pad (MD5_CTX *context)
{
unsigned char bits[8];
unsigned int index, padLen;
@@ -220,9 +209,7 @@
*/
void
-MD5Final (digest, context)
- unsigned char digest[16];
- MD5_CTX *context;
+MD5Final (unsigned char digest[16], MD5_CTX *context)
{
/* Do padding. */
MD5Pad (context);
@@ -237,9 +224,7 @@
/* MD5 basic transformation. Transforms state based on block. */
void
-MD5Transform (state, block)
- u_int32_t state[4];
- const unsigned char block[64];
+MD5Transform (u_int32_t state[4], const unsigned char block[64])
{
u_int32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
--- /usr/src/sys/kern/subr_autoconf.c 2004-05-26 03:06:07.000000000 +0000
+++ subr_autoconf.c 2004-05-25 18:47:01.000000000 +0000
@@ -62,9 +62,9 @@
/* ARGSUSED */
static void run_interrupt_driven_config_hooks (void *dummy);
+
static void
-run_interrupt_driven_config_hooks(dummy)
- void *dummy;
+run_interrupt_driven_config_hooks(void *dummy)
{
struct intr_config_hook *hook_entry, *next_entry;
@@ -88,8 +88,7 @@
* be used to complete initialization.
*/
int
-config_intrhook_establish(hook)
- struct intr_config_hook *hook;
+config_intrhook_establish(struct intr_config_hook *hook)
{
struct intr_config_hook *hook_entry;
@@ -111,8 +110,7 @@
}
void
-config_intrhook_disestablish(hook)
- struct intr_config_hook *hook;
+config_intrhook_disestablish(struct intr_config_hook *hook)
{
struct intr_config_hook *hook_entry;
@@ -123,7 +121,7 @@
break;
if (hook_entry == NULL)
panic("config_intrhook_disestablish: disestablishing an "
- "unestablished hook");
+ "unestablished hook");
TAILQ_REMOVE(&intr_config_hook_list, hook, ich_links);
/* Wakeup anyone watching the list */
--- /usr/src/sys/kern/subr_disk.c 2004-05-26 03:06:07.000000000 +0000
+++ subr_disk.c 2004-05-25 18:24:11.000000000 +0000
@@ -103,10 +103,9 @@
* Create the raw backing device
*/
compile_devsw(rawsw);
- rawdev = make_dev(rawsw,
- dkmakeminor(unit, WHOLE_DISK_SLICE, RAW_PART),
- UID_ROOT, GID_OPERATOR, 0640,
- "%s%d", rawsw->d_name, unit);
+ rawdev = make_dev(rawsw,
+ dkmakeminor(unit, WHOLE_DISK_SLICE, RAW_PART),
+ UID_ROOT, GID_OPERATOR, 0640, "%s%d", rawsw->d_name, unit);
/*
* Initialize our intercept port
@@ -228,8 +227,7 @@
/*
* The port intercept functions
*/
-static
-int
+static int
disk_putport(lwkt_port_t port, lwkt_msg_t lmsg)
{
struct disk *disk = (struct disk *)port;
@@ -310,8 +308,7 @@
* XXX The various io and block size constraints are not always initialized
* properly by devices.
*/
-static
-int
+static int
diskclone(dev_t dev)
{
struct disk *dp;
@@ -499,9 +496,7 @@
* allocated.
*/
void
-bufqdisksort(bufq, bp)
- struct buf_queue_head *bufq;
- struct buf *bp;
+bufqdisksort(struct buf_queue_head *bufq, struct buf *bp)
{
struct buf *bq;
struct buf *bn;
@@ -512,8 +507,8 @@
* If the queue is empty or we are an
* ordered transaction, then it's easy.
*/
- if ((bq = bufq_first(bufq)) == NULL
- || (bp->b_flags & B_ORDERED) != 0) {
+ if ((bq = bufq_first(bufq)) == NULL ||
+ (bp->b_flags & B_ORDERED) != 0) {
bufq_insert_tail(bufq, bp);
return;
} else if (bufq->insert_point != NULL) {
@@ -644,9 +639,7 @@
* Check new disk label for sensibility before setting it.
*/
int
-setdisklabel(olp, nlp, openmask)
- struct disklabel *olp, *nlp;
- u_long openmask;
+setdisklabel(struct disklabel *olp, struct disklabel *nlp, u_long openmask)
{
int i;
struct partition *opp, *npp;
@@ -770,11 +763,7 @@
* or addlog, respectively. There is no trailing space.
*/
void
-diskerr(bp, what, pri, blkdone, lp)
- struct buf *bp;
- char *what;
- int pri, blkdone;
- struct disklabel *lp;
+diskerr(struct buf *bp, char *what, int pri, int blkdone, struct disklabel *lp)
{
int unit = dkunit(bp->b_dev);
int slice = dkslice(bp->b_dev);
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]