Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jun 2006 06:58:16 GMT
From:      Alex Lyashkov <als@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 99586 for review
Message-ID:  <200606190658.k5J6wGT1022732@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=99586

Change 99586 by als@als_head on 2006/06/19 06:57:35

	Whitespace cleanup. use tabs instead off spaces.

Affected files ...

.. //depot/projects/jail2/j2_tools/jresource/jresource.c#2 edit

Differences ...

==== //depot/projects/jail2/j2_tools/jresource/jresource.c#2 (text+ko) ====

@@ -1,4 +1,3 @@
-
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
@@ -13,7 +12,6 @@
 #include <stdlib.h>
 #include <sysexits.h>
 
-
 static void	usage(void);
 
 #define C_CTX		0
@@ -28,19 +26,19 @@
 	struct jail_2 j;
 	char *error;
 	int limit;
-	int ret;
-	
+	int	ret;
+
 	if (ctx == -1)
-		err(3,"Can`t set context id");
+		err(3, "Can`t set context id");
 	j.version = 2;
 	j.ctx_id = ctx;
 	j.cmd = cmd;
-	limit = strtol(data,&error,10);
-	if( *error != '\0' )
-		errx(1,"Error in process limit value");    
-	j.data=&limit;
+	limit = strtol(data, &error, 10);
+	if (*error != '\0')
+		errx(1, "Error in process limit value");
+	j.data = &limit;
 	ret = jail(&j);
-	if(ret != 0)
+	if (ret != 0)
 		err(2, "%s", "set process limit");
 }
 
@@ -50,24 +48,23 @@
 	int ch;
 	int ctx_id = -1;
 	char *error;
-	
-        /* options descriptor */
-        static struct option longopts[] = {
-		{ "ctx",	required_argument,	NULL,           C_CTX },
-		{ "proclimit",	required_argument,	NULL,           C_PLIMIT },
-		{ "sysvshm",	required_argument,	NULL,           C_IPCSHM },
-		{ "sysvsem",	required_argument,	NULL,           C_IPCSEM },
-		{ "sysvmsq",	required_argument,	NULL,           C_IPCMSQ },
-		{ NULL,         	0,		NULL,           0 }
-        };
+
+	/* options descriptor */
+	static struct option longopts[] = {
+		{"ctx",			required_argument,	NULL, C_CTX},
+		{"proclimit",	required_argument,	NULL, C_PLIMIT},
+		{"sysvshm",		required_argument,	NULL, C_IPCSHM},
+		{"sysvsem",		required_argument,	NULL, C_IPCSEM},
+		{"sysvmsq",		required_argument,	NULL, C_IPCMSQ},
+		{NULL,			0,					NULL, 0}
+	};
 
-        while ((ch = getopt_long(argc, argv, "", longopts, NULL)) != -1)
-        {
-		switch( ch ) {
+	while ((ch = getopt_long(argc, argv, "", longopts, NULL)) != -1) {
+		switch (ch) {
 		case C_CTX:
-			ctx_id = strtol(optarg,&error,10);
-			if( *error != '\0' )
-				errx(1,"Error in context identifyer");    
+			ctx_id = strtol(optarg, &error, 10);
+			if (*error != '\0')
+				errx(1, "Error in context identifyer");
 			break;
 		case C_PLIMIT:
 		case C_IPCSHM:
@@ -77,7 +74,7 @@
 			break;
 		default:
 			usage();
-			errx(100,"Unknow command");
+			errx(100, "Unknow command");
 		}
 	}
 	return (EX_OK);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606190658.k5J6wGT1022732>