added strneq(x,y,len) macro
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* RCSID $Id$
|
||||
*/
|
||||
|
||||
#ifndef LIBRARY_H_
|
||||
@@ -128,6 +130,11 @@
|
||||
*/
|
||||
#define streq(x,y) (strcmp(x, y) == 0)
|
||||
|
||||
/**
|
||||
* Macro compares two strings for equality
|
||||
*/
|
||||
#define strneq(x,y,len) (strncmp(x, y, len) == 0)
|
||||
|
||||
/**
|
||||
* Macro compares two binary blobs for equality
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user