Skip to content
Snippets Groups Projects
Select Git revision
  • dualcore
  • ch3/leds
  • wip-bootstrap default
  • ch3/time
  • master
5 results

mpprint.c

  • Damien George's avatar
    23faf88c
    py/mpprint: Only check for null string printing when NDEBUG not defined. · 23faf88c
    Damien George authored
    Printing "(null)" when a NULL string pointer is passed to %s is a debugging
    feature and not a feature that's relied upon by the code.  So it only needs
    to be compiled in when debugging (such as assert) is enabled, and saves
    roughy 30 bytes of code when disabled.
    
    This patch also fixes this NULL check to not do the check if the precision
    is specified as zero.
    23faf88c
    History
    py/mpprint: Only check for null string printing when NDEBUG not defined.
    Damien George authored
    Printing "(null)" when a NULL string pointer is passed to %s is a debugging
    feature and not a feature that's relied upon by the code.  So it only needs
    to be compiled in when debugging (such as assert) is enabled, and saves
    roughy 30 bytes of code when disabled.
    
    This patch also fixes this NULL check to not do the check if the precision
    is specified as zero.