On 05/18/2015 04:38 AM, Denis V. Lunev wrote: > On 14/05/15 19:28, Juan Quintela wrote: >> This allows us to store the current state to send it through migration. >> >> Signed-off-by: Juan Quintela >> --- >> + if (strlen(state)+1 > size) { >> + return -1; >> + } >> + strncpy(str, state, strlen(state)+1); >> + return 0; >> +} >> + >> static void runstate_init(void) >> { >> const RunStateTransition *p; >> > > minor. why to call strlen() twice? Also, why no spaces around binary '+'? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org