Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 646 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 646 Bytes

Table of Contents

uintptr_t safe_addptr(int *of, uint64_t a, uint64_t b) {
    
    uintptr_t r = a + b;
    
    if (r < a) {
      *of = 1;
      return r;
    } else {
      return r;
    }
}