fix memset undefined and re() usage of se_t before declaration