Changeset 226a654 in mainline for generic/src/debug/print.c


Ignore:
Timestamp:
2006-03-17T09:57:42Z (19 years ago)
Author:
Josef Cejka <malyzelenyhnus@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5a7d9d1
Parents:
8a0b0669
Message:

Printf correctly handle NULL pointer as parameter to %s option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/debug/print.c

    r8a0b0669 r226a654  
    5151        int i = 0;
    5252        char c;
     53        char errstr[] = "(NULL)";
     54
     55        if (str == NULL) {
     56                while ((c = errstr[i++]))
     57                        putchar(c);
     58                return;
     59        }       
    5360       
    5461        while ((c = str[i++]))
Note: See TracChangeset for help on using the changeset viewer.