On 01/ 5/11 05:32 PM, Guillem Jover wrote:
> This will make the return value be 1 less than written. And len should
> be checked here too, in case this call failed, which could happen due to
> memory exhaustion for example (depending on the implementation).

Though in the specific case of xrdb, the calls only check if the return
value is -1 or not, so being off by one doesn't matter here, I've gone
ahead and fixed this, and the other issues you raised, so that it's
correct if this gets copied into more apps or the callers get modified
in the future.

Thanks for the review, revised patch follows.

-- 
        -Alan Coopersmith-        [email protected]
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to