Re: [PATCH] time_t is not a long on FreeBSD, need to add casts

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

 



On Fri, May 13, 2011 at 07:53:29AM +0200, Matthias Bolte wrote:
> ---
>  src/conf/domain_conf.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index d3efec6..875f90e 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -9115,7 +9115,7 @@ virDomainSnapshotDefPtr virDomainSnapshotDefParseString(const char *xmlStr,
>  
>      def->name = virXPathString("string(./name)", ctxt);
>      if (def->name == NULL)
> -        ignore_value(virAsprintf(&def->name, "%ld", tv.tv_sec));
> +        ignore_value(virAsprintf(&def->name, "%ld", (long)tv.tv_sec));
>  
>      if (def->name == NULL) {
>          virReportOOMError();
> @@ -9126,7 +9126,7 @@ virDomainSnapshotDefPtr virDomainSnapshotDefParseString(const char *xmlStr,
>  
>      if (!newSnapshot) {
>          if (virXPathLong("string(./creationTime)", ctxt,
> -                         &def->creationTime) < 0) {
> +                         (long *)&def->creationTime) < 0) {
>              virDomainReportError(VIR_ERR_INTERNAL_ERROR, "%s",
>                                   _("missing creationTime from existing snapshot"));
>              goto cleanup;
> @@ -9192,7 +9192,7 @@ char *virDomainSnapshotDefFormat(char *domain_uuid,
>          virBufferAddLit(&buf, "  </parent>\n");
>      }
>      virBufferAsprintf(&buf, "  <creationTime>%ld</creationTime>\n",
> -                      def->creationTime);
> +                      (long)def->creationTime);
>      virBufferAddLit(&buf, "  <domain>\n");
>      virBufferAsprintf(&buf, "    <uuid>%s</uuid>\n", domain_uuid);
>      virBufferAddLit(&buf, "  </domain>\n");

ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]