Skip to content
Commit 497b79d4 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Pavel Emelyanov
Browse files

simplify the asprintf() failure handling in add_fsname_auto()



Contrary to what I naively thought, the contents of fsauto_names
is undefined if asprintf(&fsauto_names) and this was fixed by
a052e0b6 "check return code of asprintf".

But we can simplify this code a bit. If we rely on return value from
asprintf(), we can simply nullify fsauto_names on failure and avoid
the assymetrical "return false".

Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Acked-by: default avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent 161cb0b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment