mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
libpmc: silence scan-build warnings
This commit is contained in:
parent
5244f3c6ae
commit
8bed125da7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=334354
|
@ -156,11 +156,12 @@ static int
|
|||
pmu_parse_event(struct pmu_event_desc *ped, const char *eventin)
|
||||
{
|
||||
char *event;
|
||||
char *kvp, *key, *value;
|
||||
char *kvp, *key, *value, *r;
|
||||
char *debug;
|
||||
|
||||
if ((event = strdup(eventin)) == NULL)
|
||||
return (ENOMEM);
|
||||
r = event;
|
||||
bzero(ped, sizeof(*ped));
|
||||
while ((kvp = strsep(&event, ",")) != NULL) {
|
||||
key = strsep(&kvp, "=");
|
||||
|
@ -199,7 +200,7 @@ pmu_parse_event(struct pmu_event_desc *ped, const char *eventin)
|
|||
printf("unrecognized kvpair: %s:%s\n", key, value);
|
||||
}
|
||||
}
|
||||
free(event);
|
||||
free(r);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ pmclog_get_record(struct pmclog_parse_state *ps, char **data, ssize_t *len)
|
|||
return (ps->ps_state = PL_STATE_ERROR);
|
||||
|
||||
src = *data;
|
||||
h = used = 0;
|
||||
used = 0;
|
||||
|
||||
if (ps->ps_state == PL_STATE_NEW_RECORD)
|
||||
ps->ps_svcount = 0;
|
||||
|
|
Loading…
Reference in a new issue