[Libvir] [PATCH] Rewrite openvzSetUUID.

Jim Paris jim at jtan.com
Wed Feb 20 19:06:58 UTC 2008


Jim Meyering wrote:
> +	/* Record failure if any of these fails,
> +	   and be careful always to close the stream.  */
> +	if ((fseek(fp, 0, SEEK_END) < 0)
> +	    + (fprintf(fp, "\n#UUID: %s\n", uuidstr) < 0);
> +	    + (fclose(fp) == EOF))
> +	    ret = -1;

I don't think you want to fprintf() if the fseek() fails?

-jim




More information about the libvir-list mailing list