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

Re: [Libvir] [PATCH] Rewrite openvzSetUUID.



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


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