[systemd-devel] [PATCH 3/3] bootchart: use 'n/a' if PRETTY_NAME is not found
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Fri Oct 3 05:39:54 PDT 2014
On Fri, Sep 26, 2014 at 10:01:32PM +0200, Thomas H.P. Andersen wrote:
> From: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
>
> Spotted with coverity. If parsing both /etc/os-release and
> /usr/lib/os-release fails then null would be passed on. The calls
> to parse the two files are allowed to fail. A empty /etc may not
> have had the /etc/os-release symlink restored yet and we just
> try again in the loop. If for whatever reason that does not happen
> then we now pass on 'n/a' instead of null.
> ---
> src/bootchart/bootchart.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c
> index e127ad3..a359307 100644
> --- a/src/bootchart/bootchart.c
> +++ b/src/bootchart/bootchart.c
> @@ -477,7 +477,7 @@ int main(int argc, char *argv[]) {
> exit (EXIT_FAILURE);
> }
>
> - svg_do(build);
> + svg_do(strna(build));
>
I think think one is valid, but got forgotten. Applied now.
Zbyszek
More information about the systemd-devel
mailing list