aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix/ffs.c
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2018-02-26 05:12:20 +0100
committerMihai Moldovan <ionic@ionic.de>2018-02-26 05:12:20 +0100
commita9787fc2e79065e8f56fdace41f4e565667c22bb (patch)
tree19559f26bed90d12689ee47145b27fcd7619820a /nx-X11/programs/Xserver/dix/ffs.c
parentb40dec982d17b010cedc183ebdc4c75ca7de785f (diff)
parent6dcfcbabe6b87467a6f811d0dc03efba7bfce8e4 (diff)
downloadnx-libs-a9787fc2e79065e8f56fdace41f4e565667c22bb.tar.gz
nx-libs-a9787fc2e79065e8f56fdace41f4e565667c22bb.tar.bz2
nx-libs-a9787fc2e79065e8f56fdace41f4e565667c22bb.zip
Merge branch 'uli42-pr/update_dix' into 3.6.x
Attributes GH PR #646: https://github.com/ArcticaProject/nx-libs/pull/646
Diffstat (limited to 'nx-X11/programs/Xserver/dix/ffs.c')
-rw-r--r--nx-X11/programs/Xserver/dix/ffs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/dix/ffs.c b/nx-X11/programs/Xserver/dix/ffs.c
index e25d715dd..80fbcc8a9 100644
--- a/nx-X11/programs/Xserver/dix/ffs.c
+++ b/nx-X11/programs/Xserver/dix/ffs.c
@@ -30,6 +30,8 @@ int
ffs(int i)
{
int j;
+ if (i == 0)
+ return 0;
for (j = 1; (i & 1) == 0; j++)
i >>= 1;
return j;