Changeset 44ecf89 in mainline for uspace/srv


Ignore:
Timestamp:
2013-05-18T21:11:29Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
acdb5bac
Parents:
eef14771
Message:

Replace deprecated function bcmp() with memcmp().

Location:
uspace/srv/fs
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/cdfs/cdfs_ops.c

    reef14771 r44ecf89  
    660660         */
    661661        if ((vol_desc->type != VOL_DESC_PRIMARY) ||
    662             (bcmp(vol_desc->standard_ident, CDFS_STANDARD_IDENT, 5) != 0) ||
     662            (memcmp(vol_desc->standard_ident, CDFS_STANDARD_IDENT, 5) != 0) ||
    663663            (vol_desc->version != 1)) {
    664664                block_put(block);
  • uspace/srv/fs/fat/fat_directory.c

    reef14771 r44ecf89  
    516516                        return false;
    517517                case FAT_DENTRY_VALID:
    518                         if (bcmp(de->name, d->name,
    519                             FAT_NAME_LEN + FAT_EXT_LEN)==0)
     518                        if (memcmp(de->name, d->name,
     519                            FAT_NAME_LEN + FAT_EXT_LEN) == 0)
    520520                                return true;
    521521                        break;
  • uspace/srv/fs/fat/fat_ops.c

    reef14771 r44ecf89  
    651651                d = (fat_dentry_t *) b->data;
    652652                if ((fat_classify_dentry(d) == FAT_DENTRY_LAST) ||
    653                     (bcmp(d->name, FAT_NAME_DOT, FAT_NAME_LEN)) == 0) {
     653                    (memcmp(d->name, FAT_NAME_DOT, FAT_NAME_LEN)) == 0) {
    654654                        memset(d, 0, sizeof(fat_dentry_t));
    655655                        memcpy(d->name, FAT_NAME_DOT, FAT_NAME_LEN);
     
    661661                d++;
    662662                if ((fat_classify_dentry(d) == FAT_DENTRY_LAST) ||
    663                     (bcmp(d->name, FAT_NAME_DOT_DOT, FAT_NAME_LEN) == 0)) {
     663                    (memcmp(d->name, FAT_NAME_DOT_DOT, FAT_NAME_LEN) == 0)) {
    664664                        memset(d, 0, sizeof(fat_dentry_t));
    665665                        memcpy(d->name, FAT_NAME_DOT_DOT, FAT_NAME_LEN);
     
    10421042        info = (fat32_fsinfo_t *) b->data;
    10431043
    1044         if (bcmp(info->sig1, FAT32_FSINFO_SIG1, sizeof(info->sig1)) ||
    1045             bcmp(info->sig2, FAT32_FSINFO_SIG2, sizeof(info->sig2)) ||
    1046             bcmp(info->sig3, FAT32_FSINFO_SIG3, sizeof(info->sig3))) {
     1044        if (memcmp(info->sig1, FAT32_FSINFO_SIG1, sizeof(info->sig1)) != 0 ||
     1045            memcmp(info->sig2, FAT32_FSINFO_SIG2, sizeof(info->sig2)) != 0 ||
     1046            memcmp(info->sig3, FAT32_FSINFO_SIG3, sizeof(info->sig3)) != 0) {
    10471047                (void) block_put(b);
    10481048                return EINVAL;
  • uspace/srv/fs/mfs/mfs_dentry.c

    reef14771 r44ecf89  
    178178
    179179                if (name_len == d_name_len &&
    180                     !bcmp(d_info.d_name, d_name, name_len)) {
     180                    memcmp(d_info.d_name, d_name, name_len) == 0) {
    181181
    182182                        d_info.d_inum = 0;
  • uspace/srv/fs/mfs/mfs_ops.c

    reef14771 r44ecf89  
    452452
    453453                if (comp_size == dentry_name_size &&
    454                     !bcmp(component, d_info.d_name, dentry_name_size)) {
     454                    memcmp(component, d_info.d_name, dentry_name_size) == 0) {
    455455                        /* Hit! */
    456456                        mfs_node_core_get(rfn, mnode->instance,
  • uspace/srv/fs/udf/udf_volume.c

    reef14771 r44ecf89  
    262262                 * and Descriptor char set field.
    263263                 */
    264                 if ((bcmp((uint8_t *) pvd[i].volume_id,
     264                if ((memcmp((uint8_t *) pvd[i].volume_id,
    265265                    (uint8_t *) desc->volume_id, 32) == 0) &&
    266                     (bcmp((uint8_t *) pvd[i].volume_set_id,
     266                    (memcmp((uint8_t *) pvd[i].volume_set_id,
    267267                    (uint8_t *) desc->volume_set_id, 128) == 0) &&
    268                     (bcmp((uint8_t *) &pvd[i].descriptor_charset,
     268                    (memcmp((uint8_t *) &pvd[i].descriptor_charset,
    269269                    (uint8_t *) &desc->descriptor_charset, 64) == 0) &&
    270270                    (FLE32(desc->sequence_number) > FLE32(pvd[i].sequence_number))) {
     
    301301                 * Logic Volume Identifier and Descriptor char set field.
    302302                 */
    303                 if ((bcmp((uint8_t *) lvd[i].logical_volume_id,
     303                if ((memcmp((uint8_t *) lvd[i].logical_volume_id,
    304304                    (uint8_t *) desc->logical_volume_id, 128) == 0) &&
    305                     (bcmp((uint8_t *) &lvd[i].charset,
     305                    (memcmp((uint8_t *) &lvd[i].charset,
    306306                    (uint8_t *) &desc->charset, 64) == 0) &&
    307307                    (FLE32(desc->sequence_number) > FLE32(lvd[i].sequence_number))) {
Note: See TracChangeset for help on using the changeset viewer.