Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jan 2006 21:39:18 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 90242 for review
Message-ID:  <200601232139.k0NLdIxl096124@repoman.freebsd.org>

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

Change 90242 by rwatson@rwatson_peppercorn on 2006/01/23 21:38:52

	Reduce all passed files, not just the first one many times.
	
	Submitted by:	Wojciech A. Koszek <dunstan at zsno dot ids dot czest dot pl>

Affected files ...

.. //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#6 edit

Differences ...

==== //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#6 (text+ko) ====

@@ -545,6 +545,7 @@
 	char *objval, *converr;
 	char ch;
 	char timestr[128];
+	char *fname;
 
 	converr = NULL;
 
@@ -698,12 +699,14 @@
 	/*
 	 * XXX: We should actually be merging records here
 	 */
-	for (i = 0;i < argc; i++) {
-		fp = fopen(*argv, "r");
+	for (i = 0; i < argc; i++) {
+		fname = argv[i];
+		fp = fopen(fname, "r");
 		if (fp == NULL)
-			errx(EXIT_FAILURE, "Couldn't open %s", *argv);
+			errx(EXIT_FAILURE, "Couldn't open %s", fname);
 		if (select_records(fp) == -1) {
-			errx(EXIT_FAILURE, "Couldn't select records %s", *argv);
+			errx(EXIT_FAILURE, "Couldn't select records %s",
+			    fname);
 		}
 		fclose(fp);
 	}



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