1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

cleanup: fold test into printf arg

When arg is folded, compiler is able to check all args.
(better for security)
This commit is contained in:
Zdenek Kabelac 2013-11-24 18:59:46 +01:00
parent 8c96afd361
commit bfcf3edcc6

View File

@ -43,9 +43,6 @@ static struct physical_volume *_pv_read(struct cmd_context *cmd,
static uint32_t _vg_bad_status_bits(const struct volume_group *vg,
uint64_t status);
const char _really_init[] =
"Really INITIALIZE physical volume \"%s\" of volume group \"%s\" [y/n]? ";
static int _alignment_overrides_default(unsigned long data_alignment,
unsigned long default_pe_align)
{
@ -1294,7 +1291,8 @@ static int pvcreate_check(struct cmd_context *cmd, const char *name,
/* prompt */
if (pv && !is_orphan(pv) && !pp->yes &&
yes_no_prompt(_really_init, name, pv_vg_name(pv)) == 'n') {
yes_no_prompt("Really INITIALIZE physical volume \"%s\" of volume group \"%s\" [y/n]? ",
name, pv_vg_name(pv)) == 'n') {
log_error("%s: physical volume not initialized", name);
goto bad;
}