mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-29 22:00:15 +01:00
[perf] Avoid NULL derefs on broken result files.
Instead of testing for a NULL return we checked that the pointer didn't point to NIL. Oops.
This commit is contained in:
parent
19f4498234
commit
c11f369057
1 changed files with 4 additions and 4 deletions
|
|
@ -149,17 +149,17 @@ test_report_parse (test_report_t *report, char *line, char *configuration)
|
|||
report->configuration = configuration;
|
||||
parse_string (report->backend);
|
||||
end = strrchr (report->backend, '.');
|
||||
if (*end)
|
||||
if (end)
|
||||
*end++ = '\0';
|
||||
report->content = end;
|
||||
report->content = end ? end : xstrdup ("???");
|
||||
|
||||
skip_space ();
|
||||
|
||||
parse_string (report->name);
|
||||
end = strrchr (report->name, '.');
|
||||
if (*end)
|
||||
if (end)
|
||||
*end++ = '\0';
|
||||
report->size = atoi (end);
|
||||
report->size = end ? atoi (end) : 0;
|
||||
|
||||
skip_space ();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue