X Strike Force X.Org X11 SVN commit: r3988 - in trunk/xserver/xorg-server/debian: . patches
Author: julien
Date: 2006-11-13 15:20:13 -0500 (Mon, 13 Nov 2006)
New Revision: 3988
Modified:
trunk/xserver/xorg-server/debian/changelog
trunk/xserver/xorg-server/debian/patches/36_fix_ffs.patch
Log:
Update patch 36_fix_ffs from upstream git.
Modified: trunk/xserver/xorg-server/debian/changelog
===================================================================
--- trunk/xserver/xorg-server/debian/changelog 2006-11-13 04:27:29 UTC (rev 3987)
+++ trunk/xserver/xorg-server/debian/changelog 2006-11-13 20:20:13 UTC (rev 3988)
@@ -17,7 +17,7 @@
build date is correctly calculated at build time, and not hardcoded to
07 July 2006. Thanks to Jurij Smakov for noticing.
* Add patch 36_fix_ffs.patch by Jurij Smakov to fix infinite loop in ffs()
- if called with a null argument (closes: #395564).
+ if called with an argument of 0 (closes: #395564).
-- Julien Cristau <julien.cristau@ens-lyon.org> Fri, 10 Nov 2006 22:00:28 +0100
Modified: trunk/xserver/xorg-server/debian/patches/36_fix_ffs.patch
===================================================================
--- trunk/xserver/xorg-server/debian/patches/36_fix_ffs.patch 2006-11-13 04:27:29 UTC (rev 3987)
+++ trunk/xserver/xorg-server/debian/patches/36_fix_ffs.patch 2006-11-13 20:20:13 UTC (rev 3988)
@@ -1,18 +1,38 @@
-Fix for ffs() to correctly handle the case when it is called with argument of
-zero.
-This patch by Jurij Smakov <jurij@wooyd.org>
-Submitted upstream to X.Org:
-https://bugs.freedesktop.org/show_bug.cgi?id=8968
+From acb5ff4c73ac4d52201d7c421f488e2ead5c8b9c Mon Sep 17 00:00:00 2001
+From: Jurij Smakov <jurij@wooyd.org>
+Date: Sat, 11 Nov 2006 14:09:15 +0200
+Subject: [PATCH] ffs: handle 0 argument (bug #8968)
-Index: xorg-server/dix/ffs.c
-===================================================================
---- xorg-server.orig/dix/ffs.c 2006-10-21 21:44:19.000000000 +0200
-+++ xorg-server/dix/ffs.c 2006-11-10 21:55:33.000000000 +0100
-@@ -31,6 +31,7 @@
+Handle an argument of 0 in ffs(), instead of looping indefinitely.
+Add an ffs prototype to dix.h, and add includes to ffs.c.
+(cherry picked from 34164e551e4c3909322d50b09835ca4ac1d49d68 commit)
+---
+ dix/ffs.c | 2 ++
+ include/dix.h | 3 +++
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/dix/ffs.c b/dix/ffs.c
+index f84f7b4..b75657d 100644
+--- a/dix/ffs.c
++++ b/dix/ffs.c
+@@ -36,6 +36,8 @@ int
ffs(int i)
{
int j;
-+ if (i == 0) return 0;
++ if (i == 0)
++ return 0;
for (j = 1; (i & 1) == 0; j++)
i >>= 1;
return j;
+diff --git a/include/dix.h b/include/dix.h
+index 983a84f..a5a570a 100644
+--- a/include/dix.h
++++ b/include/dix.h
+@@ -817,4 +817,7 @@ #define strcasecmp xstrcasecmp
+ extern int xstrcasecmp(char *s1, char *s2);
+ #endif
+
++/* ffs.c */
++extern int ffs(int i);
++
+ #endif /* DIX_H */
Reply to: