added strneq(x,y,len) macro

This commit is contained in:
Andreas Steffen
2007-10-07 13:35:42 +00:00
parent 3f76aebe74
commit 5f854d7f95
4 changed files with 1000 additions and 0 deletions
+7
View File
@@ -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
*/