]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virnetdevopenvswitch: Don't call strlen() twice on the same string
authorAndrea Bolognani <abologna@redhat.com>
Wed, 27 Jan 2016 09:35:17 +0000 (10:35 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 27 Jan 2016 12:01:24 +0000 (13:01 +0100)
commitd87f0c00520e1196dce1874cb9cfb9f8b54af891
treebfcfa9ffb3410a5853b93eb40b04fb2d3645d512
parent720bc953f8e2b0c85e708eebf1896d241a5d7d1d
virnetdevopenvswitch: Don't call strlen() twice on the same string

Commit 871e10f fixed a memory corruption error, but called strlen()
twice on the same string to do so. Even though the compiler is
probably smart enough to optimize the second call away, having a
single invocation makes the code slightly cleaner.

Suggested-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virnetdevopenvswitch.c