#include "portab.h"
-static char UNUSED id[] = "$Id: hash.c,v 1.6 2002/12/12 12:24:18 alex Exp $";
+static char UNUSED id[] = "$Id: hash.c,v 1.9 2002/12/26 16:25:43 alex Exp $";
#include "imp.h"
#include <assert.h>
CHAR buffer[LINE_LEN];
- strncpy( buffer, String, LINE_LEN - 1 );
- buffer[LINE_LEN - 1] = '\0';
-
+ strlcpy( buffer, String, sizeof( buffer ));
return jenkins_hash( (UINT8 *)ngt_LowerStr( buffer ), strlen( buffer ), 42 );
} /* Hash */
/* handle the last 11 bytes */
c += length;
- switch(len) /* all the case statements fall through */
+ switch( (INT)len ) /* all the case statements fall through */
{
case 11: c+=((UINT32)k[10]<<24);
case 10: c+=((UINT32)k[9]<<16);