Skip to contentSkip to conversation

[5982] Rename fls to qemu_fls

Qemu-devel Blue Swirl 1 participant 1 message Dec 11, 2008

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Revision: 5982

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5982
Author:   blueswir1
Date:     2008-12-11 19:37:54 +0000 (Thu, 11 Dec 2008)

Log Message:
-----------
Rename fls to qemu_fls

Fix compiler warning on OSX, reported by Andreas Faerber.

Modified Paths:
--------------
trunk/cutils.c
trunk/hw/virtio.c
trunk/qemu-common.h

Modified: trunk/cutils.c
===================================================================

cutils.c +1 -1
@@ -97,7 +97,7 @@
     return t;
 }
 
-int fls(int i)
+int qemu_fls(int i)
 {
     return 32 - clz32(i);
 }

Modified: trunk/hw/virtio.c
===================================================================

hw/virtio.c +1 -1
@@ -858,7 +858,7 @@
 
     size = 20 + config_size;
     if (size & (size-1))
-        size = 1 << fls(size);
+        size = 1 << qemu_fls(size);
 
     pci_register_io_region(pci_dev, 0, size, PCI_ADDRESS_SPACE_IO,
                            virtio_map);

Modified: trunk/qemu-common.h
===================================================================

qemu-common.h +1 -1
@@ -104,7 +104,7 @@
 int strstart(const char *str, const char *val, const char **ptr);
 int stristart(const char *str, const char *val, const char **ptr);
 time_t mktimegm(struct tm *tm);
-int fls(int i);
+int qemu_fls(int i);
 
 #define qemu_isalnum(c)		isalnum((unsigned char)(c))
 #define qemu_isalpha(c)		isalpha((unsigned char)(c))