kern_sig.c mis-indentation

2002-09-28 Thread Poul-Henning Kamp


The indentation and the braces look rather odd in this bit of
kern_sig.c, somebody should straighten it up and check if
there are any bugs in this:

  mi_switch();
mtx_unlock_spin(sched_lock);
PICKUP_GIANT();
PROC_LOCK(p);
break;
} else
 if (prop  SA_IGNORE) {
/*
 * Except for SIGCONT, shouldn't get here. 
 * Default action is to ignore; drop it.
 */
break;  /* == ignore */
} else
return (sig);
/*NOTREACHED*/
 

Poul-Henning

PS: Yes, another score by FlexeLint!

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: kern_sig.c mis-indentation

2002-09-28 Thread Bruce Evans

On Sat, 28 Sep 2002, Poul-Henning Kamp wrote:

 The indentation and the braces look rather odd in this bit of
 kern_sig.c, somebody should straighten it up and check if
 there are any bugs in this:

   mi_switch();
 mtx_unlock_spin(sched_lock);
 PICKUP_GIANT();
 PROC_LOCK(p);
 break;
 } else
  if (prop  SA_IGNORE) {
 /*
  * Except for SIGCONT, shouldn't get here.
  * Default action is to ignore; drop it.
  */
 break;  /* == ignore */
 } else
 return (sig);
 /*NOTREACHED*/

This seemed to be just sloppy editing when it was first committed.  IIRC,
this was messed up by putting some ifdefed crud in there, and the smaller
than usual indentation for the 'if' was a hack to avoid re-indenting
properly.  The ifdefed crud was soon removed, leaving only the (now
completely bogus) indentation hack.  I never merged these bugs and now
use the following patch which just restores to the unmangled version
which is still byte for byte identical with RELENG_4 here:

%%%
Index: kern_sig.c
===
RCS file: /home/ncvs/src/sys/kern/kern_sig.c,v
retrieving revision 1.190
diff -u -2 -r1.190 kern_sig.c
--- kern_sig.c  28 Sep 2002 17:14:53 -  1.190
+++ kern_sig.c  29 Sep 2002 01:27:20 -
@@ -1732,6 +1698,5 @@
PROC_LOCK(p);
break;
-   } else
-if (prop  SA_IGNORE) {
+   } else if (prop  SA_IGNORE) {
/*
 * Except for SIGCONT, shouldn't get here.
%%%

 PS: Yes, another score by FlexeLint!

Nah.  This was painfully obvious to the non-casual observer :).  I have
1115 more lines of patches for style bugs in this file.

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message