]> git.ipfire.org Git - thirdparty/lxc.git/commit
Fix calculations in clone_update_unexp_hooks()
authorChristian Brauner <christianvanbrauner@gmail.com>
Tue, 3 Nov 2015 18:09:56 +0000 (19:09 +0100)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 6 Nov 2015 19:51:28 +0000 (14:51 -0500)
commitba35272e956fafe6098838f84b52c1b6b47529f8
tree5e0379a47e5ea7906d1bd3b28c38d85082bab4af
parent108ab95109a64b52b758081a96dc6387ee69cdcb
Fix calculations in clone_update_unexp_hooks()

Changes v3:
(1) Fix typo (q --> p).

(1) This commit fixes the calculations when updating paths in lxc.hooks.*
    entries. We now also update conf->unexpandend_alloced which hasn't been
done prior to this commit.

(2) Also we use the stricter check:

     if (p >= lend)
     continue;

    This should deal better with invalid config files.

(3) Insert some spaces between operators to increase readability.

(4) Use gotos to simplify function and increase readability.

Signed-off-by: Christian Brauner <christianvanbrauner@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/confile.c