X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fplugins%2Fradius%2Fradiusclient%2Flib%2Fmemcmp.c;fp=pppd%2Fplugins%2Fradius%2Fradiusclient%2Flib%2Fmemcmp.c;h=d0d86e0ee53164ca382181f8e637c5bd451e7761;hb=d95598c16f6a3feb4846db669601856bad15bb74;hp=0000000000000000000000000000000000000000;hpb=14768a012e45353cde5b60896ccc6b7528d90c69;p=ppp.git diff --git a/pppd/plugins/radius/radiusclient/lib/memcmp.c b/pppd/plugins/radius/radiusclient/lib/memcmp.c new file mode 100644 index 0000000..d0d86e0 --- /dev/null +++ b/pppd/plugins/radius/radiusclient/lib/memcmp.c @@ -0,0 +1,22 @@ +/* + * $Id: memcmp.c,v 1.1 2002/01/22 16:03:02 dfs Exp $ + * + * Taken from the Linux kernel. GPL applies. + * Copyright (C) 1991, 1992 Linus Torvalds + * + */ + +#include "config.h" +#include "includes.h" + +int memcmp(const void * cs,const void * ct,size_t count) +{ + const unsigned char *su1, *su2; + signed char res = 0; + + for( su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--) + if ((res = *su1 - *su2) != 0) + break; + return res; +} + \ No newline at end of file