sim_defs.h - Make MATCH_CMD match at least one character instead of having an empty string match everything
This commit is contained in:
parent
3e78dc6732
commit
c9b31427b4
1 changed files with 2 additions and 2 deletions
|
@ -275,9 +275,9 @@ typedef uint32 t_addr;
|
|||
|
||||
#define SWMASK(x) (1u << (((int) (x)) - ((int) 'A')))
|
||||
|
||||
/* String match */
|
||||
/* String match - at least one character required */
|
||||
|
||||
#define MATCH_CMD(ptr,cmd) strncmp ((ptr), (cmd), strlen (ptr))
|
||||
#define MATCH_CMD(ptr,cmd) (*(ptr) && strncmp ((ptr), (cmd), strlen (ptr)))
|
||||
|
||||
/* End of Linked List/Queue value */
|
||||
/* Chosen for 2 reasons: */
|
||||
|
|
Loading…
Add table
Reference in a new issue