diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c index 44d189e87..47d8daa23 100644 --- a/lib/device/dev-cache.c +++ b/lib/device/dev-cache.c @@ -982,7 +982,7 @@ static int _dev_cache_iterate_sysfs_for_index(const char *path) static int dev_cache_index_devs(void) { - static int sysfs_has_dev_block = -1; + static int _sysfs_has_dev_block = -1; char path[PATH_MAX]; if (dm_snprintf(path, sizeof(path), "%sdev/block", dm_sysfs_dir()) < 0) { @@ -991,20 +991,20 @@ static int dev_cache_index_devs(void) } /* Skip indexing if /sys/dev/block is not available.*/ - if (sysfs_has_dev_block == -1) { + if (_sysfs_has_dev_block == -1) { struct stat info; if (stat(path, &info) == 0) - sysfs_has_dev_block = 1; + _sysfs_has_dev_block = 1; else { if (errno == ENOENT) { - sysfs_has_dev_block = 0; + _sysfs_has_dev_block = 0; return 1; } log_sys_debug("stat", path); return 0; } - } else if (!sysfs_has_dev_block) + } else if (!_sysfs_has_dev_block) return 1; if (obtain_device_list_from_udev() && diff --git a/lib/misc/crc.c b/lib/misc/crc.c index 8dc107f06..8294eebd7 100644 --- a/lib/misc/crc.c +++ b/lib/misc/crc.c @@ -26,7 +26,7 @@ static uint32_t _calc_crc_new(uint32_t initial, const uint8_t *buf, uint32_t siz #endif { /* CRC-32 byte lookup table generated by crc_gen.c */ - static const uint32_t crctab[] = { + static const uint32_t _crctab[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, @@ -67,10 +67,10 @@ static uint32_t _calc_crc_new(uint32_t initial, const uint8_t *buf, uint32_t siz /* Process 4 bytes per iteration */ while (start < end) { crc = crc ^ xlate32(*start++); - crc = crctab[crc & 0xff] ^ crc >> 8; - crc = crctab[crc & 0xff] ^ crc >> 8; - crc = crctab[crc & 0xff] ^ crc >> 8; - crc = crctab[crc & 0xff] ^ crc >> 8; + crc = _crctab[crc & 0xff] ^ crc >> 8; + crc = _crctab[crc & 0xff] ^ crc >> 8; + crc = _crctab[crc & 0xff] ^ crc >> 8; + crc = _crctab[crc & 0xff] ^ crc >> 8; } /* Process any bytes left over */ @@ -78,7 +78,7 @@ static uint32_t _calc_crc_new(uint32_t initial, const uint8_t *buf, uint32_t siz size = size & 0x3; while (size--) { crc = crc ^ *buf++; - crc = crctab[crc & 0xff] ^ crc >> 8; + crc = _crctab[crc & 0xff] ^ crc >> 8; } return crc; @@ -87,7 +87,7 @@ static uint32_t _calc_crc_new(uint32_t initial, const uint8_t *buf, uint32_t siz #ifdef DEBUG_CRC32 static uint32_t _calc_crc_old(uint32_t initial, const uint8_t *buf, uint32_t size) { - static const uint32_t crctab[] = { + static const uint32_t _crctab[] = { 0x00000000, 0x1db71064, 0x3b6e20c8, 0x26d930ac, 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c, 0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c, @@ -97,8 +97,8 @@ static uint32_t _calc_crc_old(uint32_t initial, const uint8_t *buf, uint32_t siz for (i = 0; i < size; i++) { crc ^= *buf++; - crc = (crc >> 4) ^ crctab[crc & 0xf]; - crc = (crc >> 4) ^ crctab[crc & 0xf]; + crc = (crc >> 4) ^ _crctab[crc & 0xf]; + crc = (crc >> 4) ^ _crctab[crc & 0xf]; } return crc; }