Rob Kramer wrote:
Hia,
'df_layer /dev/video0' crashes in pipe_peek() on my machine: size_t is never <
0, see patch.
Sounds logical.
Index: stream.c
===================================================================
RCS file: /cvs/directfb/DirectFB/lib/direct/stream.c,v
retrieving revision 1.5
diff -u -r1.5 stream.c
--- stream.c 26 Sep 2005 10:27:54 -0000 1.5
+++ stream.c 14 Dec 2005 12:47:06 -0000
@@ -1045,7 +1045,7 @@
s = read( stream->fd,
stream->cache + stream->cache_size,
len - stream->cache_size );
- if (s < 0) {
+ if (s == -1) {
Wouldn't it require an "(size_t) -1"?
Otherwise the compiler should give a warning comparing signed/unsigned.
Anyways, I just verified that read(2) returns ssize_t, so the fix should
be to change "s" to be signed, i.e. ssize_t instead of size_t.
--
Best regards,
Denis Oliver Kropp
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/ |
"------------------------------------------"
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev