[Openchrome-devel] openchrome bug

Bartosz Kosiorek gang65
Wed Jan 14 00:19:14 PST 2009


Hi.
I found bug in libxvmc/viaLowLevel.c
The function always return 0, even if drmCommandWriteRead was failed.
I think it should be:

-	if (drmCommandWriteRead(xl->fd, DRM_VIA_ALLOCMEM, &xl->tsMem,
-		sizeof(xl->tsMem)) < 0)
+	if ((ret = drmCommandWriteRead(xl->fd, DRM_VIA_ALLOCMEM, &xl->tsMem,
+		sizeof(xl->tsMem))) < 0)
 	    return ret;

I also use common code convention for "drmCommandRead",
"drmCommandWriteRead"  and "drmCommandWrite", to avoid mistakes.

The return values of the functions: "drmCommandRead",
"drmCommandWriteRead"  and "drmCommandWrite" should be zero on
success, or a negative values on failure.

Please see attachment.

Best Regards
Bartosz Kosiorek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: svn_diff.patch
Type: application/octet-stream
Size: 5232 bytes
Desc: not available
Url : http://wiki.openchrome.org/pipermail/openchrome-devel/attachments/20090114/0847ecd1/svn_diff.obj



More information about the Openchrome-devel mailing list