Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177592837
D19105.1794810601.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D19105.1794810601.diff
View Options
Index: newsyslog.c
===================================================================
--- newsyslog.c
+++ newsyslog.c
@@ -1,3 +1,4 @@
+
/*-
* ------+---------+---------+-------- + --------+---------+---------+---------*
* This file includes significant modifications done by:
@@ -253,7 +254,7 @@
static struct cflist *get_worklist(char **files);
static void parse_file(FILE *cf, struct cflist *work_p, struct cflist *glob_p,
- struct conf_entry *defconf_p, struct ilist *inclist);
+ struct conf_entry **defconf, struct ilist *inclist);
static void add_to_queue(const char *fname, struct ilist *inclist);
static char *sob(char *p);
static char *son(char *p);
@@ -374,6 +375,8 @@
while (wait(NULL) > 0 || errno == EINTR)
;
+ free(timefnamefmt);
+ free(requestor);
return (0);
}
@@ -841,7 +844,7 @@
if (verbose)
printf("Processing %s\n", inc->file);
- parse_file(f, filelist, globlist, defconf, &inclist);
+ parse_file(f, filelist, globlist, &defconf, &inclist);
(void) fclose(f);
}
@@ -915,7 +918,7 @@
* for a "glob" entry which does match.
*/
gmatch = 0;
- if (verbose > 2 && globlist != NULL)
+ if (verbose > 2)
printf("\t+ Checking globs for %s\n", *given);
STAILQ_FOREACH(ent, globlist, cf_nextp) {
fnres = fnmatch(ent->log, *given, FNM_PATHNAME);
@@ -1046,7 +1049,7 @@
*/
static void
parse_file(FILE *cf, struct cflist *work_p, struct cflist *glob_p,
- struct conf_entry *defconf_p, struct ilist *inclist)
+ struct conf_entry **defconf_p, struct ilist *inclist)
{
char line[BUFSIZ], *parse, *q;
char *cp, *errline, *group;
@@ -1137,12 +1140,12 @@
working = init_entry(q, NULL);
if (strcasecmp(DEFAULT_MARKER, q) == 0) {
special = 1;
- if (defconf_p != NULL) {
+ if (*defconf_p != NULL) {
warnx("Ignoring duplicate entry for %s!", q);
free_entry(working);
continue;
}
- defconf_p = working;
+ *defconf_p = working;
}
q = parse = missing_field(sob(parse + 1), errline);
@@ -1357,7 +1360,8 @@
q = NULL;
else {
q = parse = sob(parse + 1); /* Optional field */
- *(parse = son(parse)) = '\0';
+ parse = son(parse);
+ *parse = '\0';
}
working->sig = SIGHUP;
@@ -2010,7 +2014,6 @@
const char **args, *pgm_name, *pgm_path;
char *zresult;
- command = NULL;
assert(zwork != NULL);
assert(zwork->zw_conf != NULL);
assert(zwork->zw_conf->compress > COMPRESS_NONE);
@@ -2114,8 +2117,7 @@
change_attrs(zresult, zwork->zw_conf);
out:
- if (command != NULL)
- sbuf_delete(command);
+ sbuf_delete(command);
free(args);
free(zresult);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 16, 6:30 AM (13 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41764630
Default Alt Text
D19105.1794810601.diff (2 KB)
Attached To
Mode
D19105: CID 1008620: Logically dead code in newsyslog.c
Attached
Detach File
Event Timeline