PERFORCE change 94195 for review
Robert Watson
rwatson at FreeBSD.org
Tue Mar 28 19:12:48 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=94195
Change 94195 by rwatson at rwatson_zoo on 2006/03/28 19:12:20
Canonicalize calling of functions via pointers, one or two minor
style/warning nits.
Affected files ...
.. //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.c#4 edit
.. //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd_conf.c#3 edit
Differences ...
==== //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.c#3 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.c#4 $
*/
#include <sys/types.h>
@@ -86,7 +86,6 @@
case SIGQUIT:
quit++;
break;
-
}
}
@@ -96,8 +95,8 @@
struct auditfilter_module *am;
TAILQ_FOREACH(am, &filter_list, am_list) {
- if (am->am_record != NULL)
- (*am->am_bsmrecord)(am->am_instance, ts, data, len);
+ if (am->am_bsmrecord != NULL)
+ (am->am_bsmrecord)(am->am_instance, ts, data, len);
}
}
@@ -115,7 +114,8 @@
bytesread += tok.len;
}
TAILQ_FOREACH(am, &filter_list, am_list) {
-
+ if (am->am_record != NULL)
+ (am->am_record)(am->am_instance, ts, 0, NULL);
}
}
==== //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd_conf.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd_conf.c#2 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd_conf.c#3 $
*/
/*
@@ -70,7 +70,6 @@
static void
auditfilter_module_free(struct auditfilter_module *am)
{
- int i;
if (am->am_modulename != NULL)
free(am->am_modulename);
@@ -106,7 +105,7 @@
{
if (am->am_detach != NULL)
- (*am->am_detach)(am->am_instance);
+ am->am_detach(am->am_instance);
am->am_instance = NULL;
(void)dlclose(am->am_dlhandle);
am->am_dlhandle = NULL;
@@ -155,8 +154,8 @@
am->am_detach = dlsym(am->am_dlhandle, AUDIT_FILTER_DETACH_STRING);
if (am->am_attach != NULL) {
- if ((*am->am_attach)(&am->am_instance, am->am_argc,
- am->am_argv) != AUDIT_FILTER_SUCCESS) {
+ if (am->am_attach(&am->am_instance, am->am_argc, am->am_argv)
+ != AUDIT_FILTER_SUCCESS) {
warnx("auditfilter_module_attach: %s: failed",
am->am_modulename);
dlclose(am->am_dlhandle);
@@ -185,7 +184,7 @@
if (am->am_reinit == NULL)
return (0);
- if ((*am->am_reinit)(&am->am_instance, am->am_argc, am->am_argv) !=
+ if (am->am_reinit(&am->am_instance, am->am_argc, am->am_argv) !=
AUDIT_FILTER_SUCCESS) {
warnx("auditfilter_module_reinit: %s: failed",
am->am_modulename);
More information about the trustedbsd-cvs
mailing list