diff options
Diffstat (limited to 'hl/src/H5DS.c')
-rw-r--r-- | hl/src/H5DS.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index 0c8c201..c3e1dc3 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -157,7 +157,7 @@ herr_t H5DSattach_scale(hid_t did, return FAIL; /* same object, not valid */ - if (sb1.fileno==sb2.fileno && sb1.u.obj.objno==sb2.u.obj.objno) + if (!HDmemcmp(&sb1.fileno, &sb2.fileno, sizeof(sb1.fileno)) && !HDmemcmp(&sb1.objno, &sb2.objno, sizeof(sb1.objno))) return FAIL; /* get ID type */ @@ -334,7 +334,7 @@ herr_t H5DSattach_scale(hid_t did, goto out; /* same object, so this DS scale is already in this DIM IDX */ - if (sb1.fileno==sb2.fileno && sb1.u.obj.objno==sb2.u.obj.objno) + if (!HDmemcmp(&sb1.fileno, &sb2.fileno, sizeof(sb1.fileno)) && !HDmemcmp(&sb1.objno, &sb2.objno, sizeof(sb1.objno))) { found_ds = 1; } @@ -620,7 +620,7 @@ herr_t H5DSdetach_scale(hid_t did, return FAIL; /* same object, not valid */ - if (sb1.fileno==sb2.fileno && sb1.u.obj.objno==sb2.u.obj.objno) + if (!HDmemcmp(&sb1.fileno, &sb2.fileno, sizeof(sb1.fileno)) && !HDmemcmp(&sb1.objno, &sb2.objno, sizeof(sb1.objno))) return FAIL; /* get ID type */ @@ -714,7 +714,7 @@ herr_t H5DSdetach_scale(hid_t did, goto out; /* same object, reset */ - if (sb1.fileno==sb2.fileno && sb1.u.obj.objno==sb2.u.obj.objno) + if (!HDmemcmp(&sb1.fileno, &sb2.fileno, sizeof(sb1.fileno)) && !HDmemcmp(&sb1.objno, &sb2.objno, sizeof(sb1.objno))) { for(jj=j; jj<buf[idx].len-1; jj++) { @@ -799,7 +799,8 @@ herr_t H5DSdetach_scale(hid_t did, goto out; /* same object, reset. we want to detach only for this DIM */ - if (sb3.fileno==sb4.fileno && sb3.u.obj.objno==sb4.u.obj.objno && (int)idx==dsbuf[i].dim_idx) + if (!HDmemcmp(&sb3.fileno, &sb4.fileno, sizeof(sb3.fileno)) && !HDmemcmp(&sb3.objno, &sb4.objno, sizeof(sb3.objno)) + && (int)idx==dsbuf[i].dim_idx) { for(jj=i; jj<nelmts-1; jj++) { @@ -984,7 +985,7 @@ htri_t H5DSis_attached(hid_t did, return FAIL; /* same object, not valid */ - if (sb1.fileno==sb2.fileno && sb1.u.obj.objno==sb2.u.obj.objno) + if (!HDmemcmp(&sb1.fileno, &sb2.fileno, sizeof(sb1.fileno)) && !HDmemcmp(&sb1.objno, &sb2.objno, sizeof(sb1.objno))) return FAIL; /* get ID type */ @@ -1066,7 +1067,7 @@ htri_t H5DSis_attached(hid_t did, goto out; /* same object */ - if (sb1.fileno==sb2.fileno && sb1.u.obj.objno==sb2.u.obj.objno) + if (!HDmemcmp(&sb1.fileno, &sb2.fileno, sizeof(sb1.fileno)) && !HDmemcmp(&sb1.objno, &sb2.objno, sizeof(sb1.objno))) { found_ds = 1; } @@ -1154,7 +1155,8 @@ htri_t H5DSis_attached(hid_t did, goto out; /* same object */ - if (sb3.fileno==sb4.fileno && sb3.u.obj.objno==sb4.u.obj.objno && (int)idx==dsbuf[i].dim_idx) { + if (!HDmemcmp(&sb3.fileno, &sb4.fileno, sizeof(sb3.fileno)) && !HDmemcmp(&sb3.objno, &sb4.objno, sizeof(sb3.objno)) + && (int)idx==dsbuf[i].dim_idx) { found_dset=1; } /* if */ |