openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/util-linux/2.33.2-r0/util-linux-2.33.2/libsmartcols/src/symbols.c
struct libscols_symbols* scols_copy_symbols(const struct libscols_symbols* sy)
{
    struct libscols_symbols* ret;
    int rc;

    assert(sy);
    if (!sy)
        return NULL;

    ret = scols_new_symbols();
    if (!ret)
        return NULL;

    rc = scols_symbols_set_branch(ret, sy->branch);
    if (!rc)
        rc = scols_symbols_set_vertical(ret, sy->vert);
    if (!rc)
        rc = scols_symbols_set_right(ret, sy->right);
    if (!rc)
        rc = scols_symbols_set_title_padding(ret, sy->title_padding);
    if (!rc)
        rc = scols_symbols_set_cell_padding(ret, sy->cell_padding);
    if (!rc)
        return ret;

    scols_unref_symbols(ret);
    return NULL;
}
/**
 * scols_copy_symbols:
 * @sy: a pointer to a struct libscols_symbols instance
 *
 * Returns: a newly allocated copy of the @sy symbol group or NULL in case of an
 * error.
 */
@sy: a pointer to a struct libscols_symbols instance

a newly allocated copy of the @sy symbol group or NULL in case of an
error.
@sy : a pointer to a struct libscols_symbols instance a newly allocated copy of the @sy symbol group or NULL in case of an error .
struct libscols_symbols* scols_copy_symbols(const struct libscols_symbols* sy)
{
    struct libscols_symbols* ret;
    int rc;
    assert(sy);
    if (!sy)
        return NULL;
    ret = scols_new_symbols();
    if (!ret)
        return NULL;
    rc = scols_symbols_set_branch(ret, sy->branch);
    if (!rc)
        rc = scols_symbols_set_vertical(ret, sy->vert);
    if (!rc)
        rc = scols_symbols_set_right(ret, sy->right);
    if (!rc)
        rc = scols_symbols_set_title_padding(ret, sy->title_padding);
    if (!rc)
        rc = scols_symbols_set_cell_padding(ret, sy->cell_padding);
    if (!rc)
        return ret;
    scols_unref_symbols(ret);
    return NULL;
}
struct libscols_symbols * scols_copy_symbols ( const struct libscols_symbols * sy ) { struct libscols_symbols * ret ; int rc ; assert ( sy ) ; if ( ! sy ) return NULL ; ret = scols_new_symbols ( ) ; if ( ! ret ) return NULL ; rc = scols_symbols_set_branch ( ret , sy -> branch ) ; if ( ! rc ) rc = scols_symbols_set_vertical ( ret , sy -> vert ) ; if ( ! rc ) rc = scols_symbols_set_right ( ret , sy -> right ) ; if ( ! rc ) rc = scols_symbols_set_title_padding ( ret , sy -> title_padding ) ; if ( ! rc ) rc = scols_symbols_set_cell_padding ( ret , sy -> cell_padding ) ; if ( ! rc ) return ret ; scols_unref_symbols ( ret ) ; return NULL ; }
scols_copy_symbols:
 @sy: a pointer to a struct libscols_symbols instance
scols_copy_symbols : @sy : a pointer to a struct libscols_symbols instance