lib/commit: fix using uninitialized var
authorJonathan Lebon <jlebon@redhat.com>
Wed, 13 Sep 2017 16:17:17 +0000 (16:17 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 26 Sep 2017 17:17:50 +0000 (17:17 +0000)
commite44631ecc36c55b071c86dbf6a93928453853b0b
treef758260d23003663ce70d92338fcdda9fe1f2eb3
parente5c86fad5c03a21b6972c3d1a458d89f74cbbf21
lib/commit: fix using uninitialized var

Noticed this while reading the code. The `child` var hasn't been
initialized yet at the time we throw this error (and even then, it's
only conditionally initialized). To be nice, let's just always calculate
the child path and pass that along.

Also do some minor style porting to decl near use.

Closes: #1216
Approved by: cgwalters
src/libostree/ostree-repo-commit.c