"Kai Blin" kai.blin@gmail.com wrote:
if(!su)
{
status = NERR_InternalError;
goto user_add_error;
}
if(lstrlenW(ui->usri1_name) > LM20_UNLEN)
{
status = NERR_BadUsername;
goto user_add_error;
}
/*FIXME: do other checks for a valid username */
lstrcpyW(su->user_name, ui->usri1_name);
if(lstrlenW(ui->usri1_password) > PWLEN)
{
/* Always return PasswordTooShort on invalid passwords. */
status = NERR_PasswordTooShort;
goto user_add_error;
}
'break' would work just fine instead of 'goto' in all these places.