]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
storage: tweak condition to properly test lseek
authorErik Skultety <eskultet@redhat.com>
Tue, 3 Mar 2015 15:57:38 +0000 (16:57 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 4 Mar 2015 13:51:44 +0000 (14:51 +0100)
commit3fde7986d6694f122ae919d68ec64eee79bd51db
tree374965194c66c1e0c060749477c7afd63bcee46d
parentd9c7f014ee7c23d25483acf4bce344fae169f1dd
storage: tweak condition to properly test lseek

According to the POSIX standard, off_t (returned by lseek) is defined as
signed integral type no shorter than int. Because our offset variable is defined
as unsigned long long, the original check was passed successfully if UINT64_MAX had
been used as offset value, due to implicit conversion.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1177219
src/fdstream.c