Skip to content

Commit

Permalink
Fixed Some Spelling Errors in Comments (#19916)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanHuebl committed Apr 5, 2022
1 parent 48d34eb commit a4dbf11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions libr/anal/bb.c
Expand Up @@ -43,7 +43,7 @@ R_API RAnalBlock *r_anal_bb_from_offset(RAnal *anal, ut64 off) {
return ret;
}

/* return the offset of the i-th instruction in the basicblock bb.
/* returns the offset of the i-th instruction in the basicblock bb.
* If the index of the instruction is not valid, it returns UT16_MAX */
R_API ut16 r_anal_bb_offset_inst(const RAnalBlock *bb, int i) {
if (i < 0 || i >= bb->ninstr) {
Expand All @@ -52,7 +52,7 @@ R_API ut16 r_anal_bb_offset_inst(const RAnalBlock *bb, int i) {
return (i > 0 && (i - 1) < bb->op_pos_size)? bb->op_pos[i - 1]: 0;
}

/* return the address of the i-th instruction in the basicblock bb.
/* returns the address of the i-th instruction in the basicblock bb.
* If the index of the instruction is not valid, it returns UT64_MAX */
R_API ut64 r_anal_bb_opaddr_i(RAnalBlock *bb, int i) {
ut16 offset = r_anal_bb_offset_inst (bb, i);
Expand Down Expand Up @@ -81,7 +81,7 @@ R_API bool r_anal_bb_set_offset(RAnalBlock *bb, int i, ut16 v) {
return true;
}

/* return the address of the instruction that occupy a given offset.
/* returns the address of the instruction that occupies a given offset.
* If the offset is not part of the given basicblock, UT64_MAX is returned. */
R_API ut64 r_anal_bb_opaddr_at(RAnalBlock *bb, ut64 off) {
ut16 delta, delta_off, last_delta;
Expand All @@ -102,7 +102,7 @@ R_API ut64 r_anal_bb_opaddr_at(RAnalBlock *bb, ut64 off) {
return bb->addr + last_delta;
}

// returns the size of the i-th instruction in a basic block
// returns the size of the i-th instruction in a basicblock
R_API ut64 r_anal_bb_size_i(RAnalBlock *bb, int i) {
if (i < 0 || i >= bb->ninstr) {
return UT64_MAX;
Expand All @@ -112,7 +112,7 @@ R_API ut64 r_anal_bb_size_i(RAnalBlock *bb, int i) {
return idx_next != UT16_MAX? idx_next - idx_cur: bb->size - idx_cur;
}

/* returns the address of the basic block that contains addr or UT64_MAX if
/* returns the address of the basicblock that contains addr or UT64_MAX if
* there is no such basic block */
R_API ut64 r_anal_get_bbaddr(RAnal *anal, ut64 addr) {
RAnalBlock *bb = r_anal_bb_from_offset (anal, addr);
Expand Down
6 changes: 3 additions & 3 deletions libr/anal/block.c
Expand Up @@ -235,7 +235,7 @@ R_API bool r_anal_block_relocate(RAnalBlock *block, ut64 addr, ut64 size) {
return true;
}
if (r_anal_get_block_at (block->anal, addr)) {
// Two blocks at the same addr is illegle you know...
// Two blocks at the same addr is illegal you know...
return false;
}

Expand Down Expand Up @@ -274,7 +274,7 @@ R_API RAnalBlock *r_anal_block_split(RAnalBlock *bbi, ut64 addr) {
RAnal *anal = bbi->anal;
r_return_val_if_fail (bbi && addr >= bbi->addr && addr < bbi->addr + bbi->size && addr != UT64_MAX, 0);
if (addr == bbi->addr) {
r_anal_block_ref (bbi); // ref to be consistent with splitted return refcount
r_anal_block_ref (bbi); // ref to be consistent with splitted return ref-count
return bbi;
}

Expand Down Expand Up @@ -401,7 +401,7 @@ R_API void r_anal_block_unref(RAnalBlock *bb) {
RAnal *anal = bb->anal;
r_rbtree_aug_delete (&anal->bb_tree, &bb->addr, __bb_addr_cmp, NULL, __block_free_rb, NULL, __max_end);
block_free (bb);
// r_return_if_fail (r_list_empty (bb->fcns));
// r_return_if_fail (r_list_empty (bb->fcns));
}
}

Expand Down

0 comments on commit a4dbf11

Please sign in to comment.