Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/secmodel/suser - Squeeze function declarations where pos...



details:   https://anonhg.NetBSD.org/src/rev/243f0bf661fa
branches:  trunk
changeset: 747830:243f0bf661fa
user:      elad <elad%NetBSD.org@localhost>
date:      Fri Oct 02 23:06:33 2009 +0000

description:
- Squeeze function declarations where possible,
- KAUTH_RESULT_DEFER is the default (set at the beginning of each listener)
  and as such does not need to be set explicitly in the switches.

diffstat:

 sys/secmodel/suser/secmodel_suser.c |  30 +++++++-----------------------
 1 files changed, 7 insertions(+), 23 deletions(-)

diffs (156 lines):

diff -r ac4f7ae08127 -r 243f0bf661fa sys/secmodel/suser/secmodel_suser.c
--- a/sys/secmodel/suser/secmodel_suser.c       Fri Oct 02 23:00:02 2009 +0000
+++ b/sys/secmodel/suser/secmodel_suser.c       Fri Oct 02 23:06:33 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_suser.c,v 1.8 2009/10/02 23:00:02 elad Exp $ */
+/* $NetBSD: secmodel_suser.c,v 1.9 2009/10/02 23:06:33 elad Exp $ */
 /*-
  * Copyright (c) 2006 Elad Efrat <elad%NetBSD.org@localhost>
  * All rights reserved.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: secmodel_suser.c,v 1.8 2009/10/02 23:00:02 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: secmodel_suser.c,v 1.9 2009/10/02 23:06:33 elad Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -232,8 +232,7 @@
  */
 int
 secmodel_suser_generic_cb(kauth_cred_t cred, kauth_action_t action,
-    void *cookie, void *arg0, void *arg1,
-    void *arg2, void *arg3)
+    void *cookie, void *arg0, void *arg1, void *arg2, void *arg3)
 {
        bool isroot;
        int result;
@@ -256,7 +255,6 @@
                break;
 
        default:
-               result = KAUTH_RESULT_DEFER;
                break;
        }
 
@@ -272,8 +270,7 @@
  */
 int
 secmodel_suser_system_cb(kauth_cred_t cred, kauth_action_t action,
-    void *cookie, void *arg0, void *arg1,
-    void *arg2, void *arg3)
+    void *cookie, void *arg0, void *arg1, void *arg2, void *arg3)
 {
        bool isroot;
        int result;
@@ -392,7 +389,6 @@
                        break;
 
                default:
-                       result = KAUTH_RESULT_DEFER;
                        break;
                }
 
@@ -439,7 +435,6 @@
                        break;
 
                default:
-                       result = KAUTH_RESULT_DEFER;
                        break;
                }
                break;
@@ -496,7 +491,6 @@
                break;
 
        default:
-               result = KAUTH_RESULT_DEFER;
                break;
        }
 
@@ -695,7 +689,6 @@
                break;
 
        default:
-               result = KAUTH_RESULT_DEFER;
                break;
        }
 
@@ -711,8 +704,7 @@
  */
 int
 secmodel_suser_network_cb(kauth_cred_t cred, kauth_action_t action,
-    void *cookie, void *arg0, void *arg1, void *arg2,
-    void *arg3)
+    void *cookie, void *arg0, void *arg1, void *arg2, void *arg3)
 {
        bool isroot;
        int result;
@@ -742,7 +734,6 @@
                        break;
 
                default:
-                       result = KAUTH_RESULT_DEFER;
                        break;
                }
 
@@ -803,7 +794,6 @@
                        break;
 
                default:
-                       result = KAUTH_RESULT_DEFER;
                        break;
                }
                break;
@@ -870,7 +860,6 @@
                        break;
 
                default:
-                       result = KAUTH_RESULT_DEFER;
                        break;
                }
                break;
@@ -950,7 +939,6 @@
 
 
        default:
-               result = KAUTH_RESULT_DEFER;
                break;
        }
 
@@ -966,8 +954,7 @@
  */
 int
 secmodel_suser_machdep_cb(kauth_cred_t cred, kauth_action_t action,
-    void *cookie, void *arg0, void *arg1, void *arg2,
-    void *arg3)
+    void *cookie, void *arg0, void *arg1, void *arg2, void *arg3)
 {
         bool isroot;
         int result;
@@ -994,7 +981,6 @@
                break;
 
        default:
-               result = KAUTH_RESULT_DEFER;
                break;
        }
 
@@ -1010,8 +996,7 @@
  */
 int
 secmodel_suser_device_cb(kauth_cred_t cred, kauth_action_t action,
-    void *cookie, void *arg0, void *arg1, void *arg2,
-    void *arg3)
+    void *cookie, void *arg0, void *arg1, void *arg2, void *arg3)
 {
        struct tty *tty;
         bool isroot;
@@ -1100,7 +1085,6 @@
                break;
 
        default:
-               result = KAUTH_RESULT_DEFER;
                break;
        }
 



Home | Main Index | Thread Index | Old Index