Re: [PATCH] conf:Fix a copy paste error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26.07.2013 11:19, Alex Jia wrote:
> Signed-off-by: Alex Jia <ajia@xxxxxxxxxx>
> ---
>  src/conf/domain_conf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 10cb7f6..0e74039 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -5153,7 +5153,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
>                         xmlStrEqual(cur->name, BAD_CAST "product")) {
>                  product = (char *)xmlNodeGetContent(cur);
>  
> -                if (strlen(vendor) > PRODUCT_LEN) {
> +                if (strlen(product) > PRODUCT_LEN) {
>                      virReportError(VIR_ERR_XML_ERROR, "%s",
>                                     _("disk product is more than 16 characters"));

Seeing this context makes me think we should make error message us
PRODUCT_LEN instead of hardcoding 16:
virReportError(VIR_ERR_XML_ERROR,
               _("disk product is more than %d characters"),
               PRODUCT_LEN);

Same applies for VENDOR_LEN just a few lines above.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]