Changeset 87 in libcf for trunk/src/cf_debug.c


Ignore:
Timestamp:
05/11/13 00:42:10 (11 years ago)
Author:
cheese
Message:

#1 ..arrange some DIFFICULT ternary operators

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cf_debug.c

    r85 r87  
    125125        {
    126126            if (i+j < len)
    127                 fprintf (fp, "%c", IS_READABLE_CHAR(bin[i+j]) ? bin[i+j] : '.');
     127                fprintf (fp, "%c", IS_READABLE_CHAR (bin[i+j]) ? bin[i+j] : '.');
    128128        }
    129129        fprintf (fp, "\n");
     
    229229    push->line = line;
    230230    push->caller = context->callstack.caller;
    231     push->frameIndex = push->caller == NULL
    232                      ? 0
    233                      : push->caller->frameIndex + 1;
     231    push->frameIndex = (push->caller) ? push->caller->frameIndex + 1 : 0;
    234232    context->callstack.caller = push;
    235233
     
    481479        ; callstack = callstack->caller)
    482480    {
    483         fprintf (fp == NULL ? stderr : fp,
    484                  "#%-4d %s <%s:%d>\n",
    485                  iter++,
    486                  callstack->func,
    487                  callstack->file,
    488                  callstack->line);
    489     }
    490 
    491     return CF_OK;
    492 }
     481        fprintf (fp, "#%-4d %s <%s:%d>\n",
     482                     iter++,
     483                     callstack->func,
     484                     callstack->file,
     485                     callstack->line);
     486    }
     487
     488    return CF_OK;
     489}
Note: See TracChangeset for help on using the changeset viewer.