Ignore:
Timestamp:
Aug 22, 2018, 11:55:48 PM (6 years ago)
Author:
viala@…
Message:

Refactoring assert calling to conform with new assert macro.

Made with this command for the general case.
find ./kernel/ hal/ -name "*.c" | xargs sed -i -e '/assert(/ s/,[ ]*FUNCTION[ ]*,/,/'

And some done by hand.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_nic.c

    r457 r492  
    4343    xptr_t  pic_xp  = chdev_dir.pic;
    4444
    45     assert( (pic_xp != XPTR_NULL) , __FUNCTION__ , "ICU not initialised before NIC" );
     45    assert( (pic_xp != XPTR_NULL) , "ICU not initialised before NIC" );
    4646
    4747    // get "impl" , "channel" , "is_rx" fields from chdev descriptor
     
    7474                                  lid );
    7575
    76     assert( (error == 0) , __FUNCTION__ , "cannot create server thread" );
     76    assert( (error == 0) , "cannot create server thread" );
    7777
    7878    // set "server" field in chdev descriptor
     
    112112    chdev_t  * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
    113113
    114     assert( (dev_xp != XPTR_NULL) , __FUNCTION__ , "undefined NIC chdev descriptor" );
    115 
    116     assert( (dev_cxy == local_cxy) , __FUNCTION__ , " chdev must be local" );
     114    assert( (dev_xp != XPTR_NULL) , "undefined NIC chdev descriptor" );
     115
     116    assert( (dev_cxy == local_cxy) , " chdev must be local" );
    117117
    118118    // initialize command in thread descriptor
     
    190190    chdev_t  * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
    191191
    192     assert ( (dev_xp != XPTR_NULL) , __FUNCTION__ , "undefined NIC chdev descriptor" );
    193 
    194     assert( (dev_cxy == local_cxy) , __FUNCTION__ , " chdev must be local" );
     192    assert( (dev_xp != XPTR_NULL) , "undefined NIC chdev descriptor" );
     193
     194    assert( (dev_cxy == local_cxy) , " chdev must be local" );
    195195
    196196    // initialize command in thread descriptor
Note: See TracChangeset for help on using the changeset viewer.