Skip to content

Commit

Permalink
Rename fls to qemu_fls
Browse files Browse the repository at this point in the history
Fix compiler warning on OSX, reported by Andreas Faerber.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5982 c046a42c-6fe2-441c-8c8c-71466251a162
  • Loading branch information
blueswir1 committed Dec 11, 2008
1 parent 807d517 commit ad46db9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ time_t mktimegm(struct tm *tm)
return t;
}

int fls(int i)
int qemu_fls(int i)
{
return 32 - clz32(i);
}
2 changes: 1 addition & 1 deletion hw/virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ VirtIODevice *virtio_init_pci(PCIBus *bus, const char *name,

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);
Expand Down
2 changes: 1 addition & 1 deletion qemu-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ char *pstrcat(char *buf, int buf_size, const char *s);
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))
Expand Down

0 comments on commit ad46db9

Please sign in to comment.