diff options
Diffstat (limited to 'dix/ffs.c')
-rw-r--r-- | dix/ffs.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1,4 +1,3 @@ -/* $Xorg: ffs.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -27,10 +26,18 @@ The Open Group. */ +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "dix.h" + int ffs(int i) { int j; + if (i == 0) + return 0; for (j = 1; (i & 1) == 0; j++) i >>= 1; return j; |