DragonFly submit List (threaded) for 2004-03
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
patch to de-K&R-ify vnconfig(8)
Patch: vnconfig.c.diff
Type: style(9)
Description: Remove ``register'' keywords and convert K&R-style
declarations to ANSI style.
Testing: no functional changes, compiles, runs,
will test more thoroughly later today
On Mon, 8 Mar 2004 14:48:08 -0800 (PST)
Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx> wrote:
> I'm just joking. But I may hand a commit bit to anyone who submits
> too many cosmetic changes and make that person our official cosmetics
> spokeperson :-).
Just call me "Mary Kay" :D
-Chris
Index: vnconfig.c
===================================================================
RCS file: /home/dcvs/src/usr.sbin/vnconfig/vnconfig.c,v
retrieving revision 1.4
diff -u -r1.4 vnconfig.c
--- vnconfig.c 3 Nov 2003 19:31:44 -0000 1.4
+++ vnconfig.c 9 Mar 2004 09:36:13 -0000
@@ -104,10 +104,9 @@
int what_opt(char *, u_long *);
int
-main(argc, argv)
- char **argv;
+main(int argc, char *argv[])
{
- register int i, rv;
+ int i, rv;
int flags = 0;
int size = 0;
char *autolabel = NULL;
@@ -229,9 +228,7 @@
}
int
-what_opt(str,p)
- char *str;
- u_long *p;
+what_opt(char *str, u_long *p)
{
if (!strcmp(str,"reserve")) { *p |= VN_RESERVE; return 0; }
if (!strcmp(str,"labels")) { *p |= VN_LABELS; return 0; }
@@ -244,13 +241,12 @@
}
int
-config(vnp)
- struct vndisk *vnp;
+config(struct vndisk *vnp)
{
char *dev, *file, *oarg;
int flags, status;
struct vn_ioctl vnio;
- register int rv;
+ int rv;
char *rdev;
FILE *f;
u_long l;
@@ -482,13 +478,12 @@
#define WHITE(c) ((c) == ' ' || (c) == '\t' || (c) == '\n')
void
-readconfig(flags)
- int flags;
+readconfig(int flags)
{
char buf[LINESIZE];
FILE *f;
- register char *cp, *sp;
- register int ix;
+ char *cp, *sp;
+ int ix;
int ax;
f = fopen(configfile, "r");
@@ -550,9 +545,7 @@
}
void
-getoptions(vnp, fstr)
- struct vndisk *vnp;
- char *fstr;
+getoptions(struct vndisk *vnp, char *fstr)
{
int flags = 0;
char *oarg = NULL;
@@ -579,10 +572,9 @@
}
char *
-rawdevice(dev)
- char *dev;
+rawdevice(char *dev)
{
- register char *rawbuf, *dp, *ep;
+ char *rawbuf, *dp, *ep;
struct stat sb;
int len;
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]