Skip to content

Commit fc7ce43

Browse files
joshStillermanWhoBrokeTheBuild
authored andcommitted
use sizeof(var) instead of sizeof var
1 parent 6e4747c commit fc7ce43

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

treeshr/TreeGetNci.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ int TreeGetNci(int nid_in, struct nci_itm *nci_itm)
449449
for (node = child_of(dblist, node); node; count++,
450450
node = brother_of(dblist, node) ? brother_of(dblist, node) : 0)
451451
;
452-
memcpy(itm->pointer, &count, sizeof count);
452+
memcpy(itm->pointer, &count, sizeof(count));
453453
break;
454454
case NciNUMBER_OF_MEMBERS:
455455
break_on_no_node;
@@ -459,7 +459,7 @@ int TreeGetNci(int nid_in, struct nci_itm *nci_itm)
459459
for (node = member_of(node); node; count++,
460460
node = brother_of(dblist, node) ? brother_of(dblist, node) : 0)
461461
;
462-
memcpy(itm->pointer, &count, sizeof count);
462+
memcpy(itm->pointer, &count, sizeof(count));
463463
break;
464464
case NciNUMBER_OF_ELTS:
465465
break_on_no_node;
@@ -468,7 +468,7 @@ int TreeGetNci(int nid_in, struct nci_itm *nci_itm)
468468
for (count = 0; swapint16(&cng_node->conglomerate_elt) > count;
469469
count++, cng_node++)
470470
;
471-
memcpy(itm->pointer, &count, sizeof count);
471+
memcpy(itm->pointer, &count, sizeof(count));
472472
break;
473473
case NciCHILDREN_NIDS:
474474
{
@@ -667,7 +667,7 @@ int TreeGetNci(int nid_in, struct nci_itm *nci_itm)
667667
else
668668
{
669669
int zero = 0;
670-
memcpy(itm->pointer, &zero, sizeof zero);
670+
memcpy(itm->pointer, &zero, sizeof(zero));
671671
}
672672
break;
673673
}

0 commit comments

Comments
 (0)