Project

General

Profile

Revision 8

pointer validation in util_sys_inb

View differences:

utils.c
19 19

  
20 20
int (util_sys_inb)(int port, uint8_t *value) {
21 21
    /* To be implemented by the students */
22
    if(value == NULL) return 1;
22 23
    uint32_t n = 0;
23 24
    int ret = sys_inb(port, &n);
24 25
    *value = n;

Also available in: Unified diff