static void copy_flags(BIO *bio)
{
    int flags;
    BIO *next = BIO_next(bio);
    flags = BIO_test_flags(next, BIO_FLAGS_SHOULD_RETRY | BIO_FLAGS_RWS);
    BIO_clear_flags(bio, BIO_FLAGS_SHOULD_RETRY | BIO_FLAGS_RWS);
    BIO_set_flags(bio, flags);
}
['static void copy_flags(BIO *bio)\n{\n    int flags;\n    BIO *next = BIO_next(bio);\n    flags = BIO_test_flags(next, BIO_FLAGS_SHOULD_RETRY | BIO_FLAGS_RWS);\n    BIO_clear_flags(bio, BIO_FLAGS_SHOULD_RETRY | BIO_FLAGS_RWS);\n    BIO_set_flags(bio, flags);\n}', 'BIO *BIO_next(BIO *b)\n{\n    if (b == NULL)\n        return NULL;\n    return b->next_bio;\n}', 'int BIO_test_flags(const BIO *b, int flags)\n{\n    return (b->flags & flags);\n}']