From keramida@ceid.upatras.gr  Mon Jul  2 04:16:48 2001
Return-Path: <keramida@ceid.upatras.gr>
Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5])
	by hub.freebsd.org (Postfix) with ESMTP id 344A037B401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  2 Jul 2001 04:16:46 -0700 (PDT)
	(envelope-from keramida@ceid.upatras.gr)
Received: from hades.hell.gr (patr530-b101.otenet.gr [195.167.121.229])
	by mailsrv.otenet.gr (8.11.1/8.11.1) with ESMTP id f62BGgK03163
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 2 Jul 2001 14:16:42 +0300 (EEST)
Received: (from charon@localhost)
	by hades.hell.gr (8.11.4/8.11.3) id f629Jwk07913;
	Mon, 2 Jul 2001 12:19:58 +0300 (EEST)
	(envelope-from charon)
Message-Id: <200107020919.f629Jwk07913@hades.hell.gr>
Date: Mon, 2 Jul 2001 12:19:58 +0300 (EEST)
From: Giorgos Keramidas <keramida@ceid.upatras.gr>
Reply-To: Giorgos Keramidas <keramida@ceid.upatras.gr>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: small indentation change to /sys/kern/kern_sysctl.c
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         28628
>Category:       kern
>Synopsis:       small indentation change to /sys/kern/kern_sysctl.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 02 04:20:01 PDT 2001
>Closed-Date:    Wed Aug 1 19:23:33 PDT 2001
>Last-Modified:  Wed Aug 01 19:24:39 PDT 2001
>Originator:     Giorgos Keramidas
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD hades.hell.gr 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sun Jun 24 18:34:43 EEST 2001 root@hades.hell.gr:/usr/obj/usr/src/sys/CHARON i386

>Description:

	Minor indentation change to make things look a little better.
	The call to suser_xxx() is wrapped, but the wrapped line is
	column-aligned with the rest of the conditions of an if ().

>How-To-Repeat:

	Fire up an editor on revision 1.110 of sys/kern/kern_sysctl.c

>Fix:

Index: kern_sysctl.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/kern_sysctl.c,v
retrieving revision 1.110
diff -c -t -r1.110 kern_sysctl.c
*** kern_sysctl.c	2001/06/22 19:54:38	1.110
--- kern_sysctl.c	2001/07/02 09:11:51
***************
*** 1027,1033 ****
          if (!(oid->oid_kind & CTLFLAG_ANYBODY) &&
              req->newptr && req->p &&
              (error = suser_xxx(0, req->p, 
!             (oid->oid_kind & CTLFLAG_PRISON) ? PRISON_ROOT : 0)))
                  return (error);
  
          if (!oid->oid_handler)
--- 1027,1034 ----
          if (!(oid->oid_kind & CTLFLAG_ANYBODY) &&
              req->newptr && req->p &&
              (error = suser_xxx(0, req->p, 
!                          (oid->oid_kind & CTLFLAG_PRISON) ?  PRISON_ROOT : 0)))
! 
                  return (error);
  
          if (!oid->oid_handler)
>Release-Note:
>Audit-Trail:

From: Dima Dorfman <dima@unixfreak.org>
To: Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/28628: small indentation change to /sys/kern/kern_sysctl.c 
Date: Mon, 02 Jul 2001 15:55:52 -0700

 Giorgos Keramidas <keramida@ceid.upatras.gr> writes:
 > Index: kern_sysctl.c
 > ===================================================================
 > RCS file: /home/ncvs/src/sys/kern/kern_sysctl.c,v
 > retrieving revision 1.110
 > diff -c -t -r1.110 kern_sysctl.c
 > *** kern_sysctl.c	2001/06/22 19:54:38	1.110
 > --- kern_sysctl.c	2001/07/02 09:11:51
 > ***************
 > *** 1027,1033 ****
 >           if (!(oid->oid_kind & CTLFLAG_ANYBODY) &&
 >               req->newptr && req->p &&
 >               (error = suser_xxx(0, req->p, 
 > !             (oid->oid_kind & CTLFLAG_PRISON) ? PRISON_ROOT : 0)))
 >                   return (error);
 >   
 >           if (!oid->oid_handler)
 > --- 1027,1034 ----
 >           if (!(oid->oid_kind & CTLFLAG_ANYBODY) &&
 >               req->newptr && req->p &&
 >               (error = suser_xxx(0, req->p, 
 > !                          (oid->oid_kind & CTLFLAG_PRISON) ?  PRISON_ROOT : 0)))
 > ! 
 >                   return (error);
 
 This change introduces two style bugs: (1) secondary indents are four,
 not eight spaces, and (2) lines should be <= 80 characters.
 Obviously, fixing (1) will fix (2) as well.  That said, I don't think
 it makes sense to file PRs for minor style fixes.  There are a lot
 more places in the tree where more serious violations are made, and
 not only would it take you a long time to find and fix all of them,
 I'm not sure anybody would want to commit them for you; it's just too
 much trouble for too little gain.
 
 					Dima Dorfman
 					dima@unixfreak.org

From: Bruce Evans <bde@zeta.org.au>
To: Dima Dorfman <dima@unixfreak.org>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/28628: small indentation change to /sys/kern/kern_sysctl.c
Date: Tue, 3 Jul 2001 18:39:18 +1000 (EST)

 On Mon, 2 Jul 2001, Dima Dorfman wrote:
 
 >  Giorgos Keramidas <keramida@ceid.upatras.gr> writes:
 >  > Index: kern_sysctl.c
 >  > ===================================================================
 >  > RCS file: /home/ncvs/src/sys/kern/kern_sysctl.c,v
 >  > retrieving revision 1.110
 >  > diff -c -t -r1.110 kern_sysctl.c
 >  > *** kern_sysctl.c	2001/06/22 19:54:38	1.110
 >  > --- kern_sysctl.c	2001/07/02 09:11:51
 >  > ***************
 >  > *** 1027,1033 ****
 >  >           if (!(oid->oid_kind & CTLFLAG_ANYBODY) &&
 >  >               req->newptr && req->p &&
 >  >               (error = suser_xxx(0, req->p, 
 >  > !             (oid->oid_kind & CTLFLAG_PRISON) ? PRISON_ROOT : 0)))
 >  >                   return (error);
 >  >   
 >  >           if (!oid->oid_handler)
 >  > --- 1027,1034 ----
 >  >           if (!(oid->oid_kind & CTLFLAG_ANYBODY) &&
 >  >               req->newptr && req->p &&
 >  >               (error = suser_xxx(0, req->p, 
 >  > !                          (oid->oid_kind & CTLFLAG_PRISON) ?  PRISON_ROOT : 0)))
 >  > ! 
 >  >                   return (error);
 >  
 >  This change introduces two style bugs: (1) secondary indents are four,
 >  not eight spaces, and (2) lines should be <= 80 characters.
 >  Obviously, fixing (1) will fix (2) as well.
 
 The fix is null since the secondary indent is already 4.  This gives
 code that is not very easy to read in this case, especially if you are
 not used to the secondary indent rule, but the alternatives are not much
 better.
 
 >  That said, I don't think
 >  it makes sense to file PRs for minor style fixes.  There are a lot
 
 I agree.
 
 Bruce
 
State-Changed-From-To: open->closed 
State-Changed-By: mike 
State-Changed-When: Wed Aug 1 19:23:33 PDT 2001 
State-Changed-Why:  

This type of change would only serve to break style(9). 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=28628 
>Unformatted:
