[libvirt] [PATCH libvirt-python 13/17] Remove use of virStrcpyStatic
Eric Blake
eblake at redhat.com
Mon Sep 9 17:26:55 UTC 2013
On 09/09/2013 10:01 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
> libvirt-override.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libvirt-override.c b/libvirt-override.c
> index c2c1c18..0bf6512 100644
> --- a/libvirt-override.c
> +++ b/libvirt-override.c
> @@ -220,7 +220,8 @@ setPyVirTypedParameter(PyObject *info,
> goto cleanup;
> }
>
> - ignore_value(virStrcpyStatic(temp->field, keystr));
> + strncpy(temp->field, keystr, sizeof(temp->field)-1);
> + temp->field[sizeof(temp->field)-1] = '\0';
TABs? What happened to syntax checking? Is there any way to add some
of our syntax checking sanity back to the build process, even though you
aren't using gnulib?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130909/0e90e44d/attachment-0001.sig>
More information about the libvir-list
mailing list