sfdisk: check fdisk_script_set_header() return code [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2020-01-15 12:35:38 +01:00
parent a8955bf07a
commit e1d7c65a5c
1 changed files with 2 additions and 2 deletions

View File

@ -1732,8 +1732,8 @@ static int command_fdisk(struct sfdisk *sf, int argc, char **argv)
else
label = "dos"; /* just for backward compatibility */
fdisk_script_set_header(dp, "label", label);
if (fdisk_script_set_header(dp, "label", label) != 0)
errx(EXIT_FAILURE, _("failed to set script header"));
if (!sf->quiet && sf->interactive) {
if (!fdisk_has_label(sf->cxt) && !sf->label)