int
smb_ctx_setserver(struct smb_ctx *ctx, const char *name)
{
if (strlen(name) >= SMB_MAXSRVNAMELEN) {
if (strlen(name) > SMB_MAXSRVNAMELEN) {
smb_error("server name '%s' too long", 0, name);
return ENAMETOOLONG;
}