#include <stdio.h>
#include <krb5/ext-proto.h>
-#ifndef min
-#define min(a,b) ((a) < (b) ? (a) : (b))
-#endif
-
extern char *krb5_defkeyname;
krb5_error_code
char *name;
int namesize;
{
- strncpy(name, krb5_defkeyname, min(namesize, sizeof(krb5_defkeyname)));
- if (namesize < sizeof(krb5_defkeyname))
+ strncpy(name, krb5_defkeyname, namesize);
+ if (namesize < strlen(krb5_defkeyname))
return KRB5_CONFIG_NOTENUFSPACE;
else
return 0;