]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/install: do not use a temporary variable outside of its scope
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 Feb 2019 10:29:38 +0000 (11:29 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 Feb 2019 10:29:38 +0000 (11:29 +0100)
commita05294ff05923563087b53c1db64816130be3b34
treec5c58965b036b74e63c673ef4f0846646cb782e5
parent358fb6862bf141f48965b130289ddbcd96400e61
shared/install: do not use a temporary variable outside of its scope

Coverity says:
> Pointer to local outside scope (RETURN_LOCAL)9.
> use_invalid: Using dirs, which points to an out-of-scope temporary variable of type char const *[5].

And indeed, the switch statement forms a scope. Let's use an if to
avoid creating a scope.
src/shared/install.c