
27 Jan
2016
27 Jan
'16
12:04 p.m.
On Wed, 2016-01-27 at 11:00 +0100, Andrea Bolognani wrote:
n Wed, 2016-01-27 at 10:49 +0100, Jiri Denemark wrote:
Or just if (**migrate) (*migrate)[strlen(*migrate) - 1] = '\0'; (or similar check for the first character in *migrate) since we only need to check if it's empty or not :-)
Yeah, that would work just as nicely, and would even save us the call to strlen() altogether when the string is empty.
However, I'd argue that it makes the code a tiny bit more opaque rather than a tiny bit cleaner, so I'd still go with the version I posted if that's okay with you :)
Pushed as Jirka confirmed on IRC he's okay with that :) Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team