#1617 Coding style deviation in ding-libs
Closed: Invalid Opened by dpal.

INI and collection use

    if (condition) {
        /* do some work */
    }
    else {
        /* do some other work */
    }

While the coding guide suggests use of:

    if (condition) {
        /* do some work */
    } else {
        /* do some other work */
    }

Fields changed

summary: Codinbg style deviation in ding-libs => Coding style deviation in ding-libs

Fields changed

owner: somebody => okos

Fields changed

rhbz: => 0

I reviewed the code of the ding libs.
There are several hundreds of the cases where this rule of the style is violated.
I tried fixing couple places and find it lass readable.
For example the following code seems more readable:

    if (!data) {
        TRACE_ERROR_STRING("Invalid argument", "");
        error = EINVAL;
    }
    else {
        *data = (struct simplebuffer *)calloc(1,
                                              sizeof(struct simplebuffer));
        if (*data == NULL) {
            TRACE_ERROR_STRING("Failed to allocate memory", "");
            error = ENOMEM;
        }
        else error = EOK;
    }

than this one

    if (!data) {
        TRACE_ERROR_STRING("Invalid argument", "");
        error = EINVAL;
    } else {
        *data = (struct simplebuffer *)calloc(1,
                                              sizeof(struct simplebuffer));
        if (*data == NULL) {
            TRACE_ERROR_STRING("Failed to allocate memory", "");
            error = ENOMEM;
        } else error = EOK;
    }

Since it is not a critical aspect I lean to closing this ticket as wontfix.

resolution: => wontfix
selected: =>
status: new => closed

Metadata Update from @dpal:
- Issue assigned to okos
- Issue set to the milestone: Tools 1.0

Metadata