On 12/09/11 04:14, Paulo Zanoni wrote:
2011/12/8 Alan Coopersmith<[email protected]>:
It will never return NULL, so don't try to handle a NULL condition,
since that just confuses programmers and static analyzers.
It uses calloc, so all the allocated memory is cleared, so there's
no point looping over the memory to manually initialize it NULL.
And just because it's annoying, it doesn't need to be the only
place in this file to do if (NULL==...) instead of if (... == NULL).
Signed-off-by: Alan Coopersmith<[email protected]>
---
xf86Helper.c:1737:9: warning: unused variable 'i' [-Wunused-variable]
With the variable declaration removed:
Reviewed-by: Paulo Zanoni<[email protected]>
Oh, good catch - thanks for checking that - I'll amend the patch to include:
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 054e9f1..248ccf4 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1734,7 +1734,6 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom propert
int format, unsigned long len, pointer value )
{
RootWinPropPtr pNewProp = NULL, pRegProp;
- int i;
Bool existing = FALSE;
DebugF("xf86RegisterRootWindowProperty(%d, %ld, %ld, %d, %ld, %p)\n",
--
-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