Changeset 12fce0f in OpenSC


Ignore:
Timestamp:
06/11/11 07:33:30 (12 months ago)
Author:
Peter Marschall <peter@…>
Branches:
master, staging
Children:
c03eedd
Parents:
52b601e
git-author:
Peter Marschall <peter@…> (06/02/11 16:20:58)
git-committer:
Peter Marschall <peter@…> (06/11/11 07:33:30)
Message:

opensc-explorer: replace if..else with ?:

Use the easier to read & shorter expression

path->type = (is_id) ? SC_PATH_TYPE_FILE_ID : SC_PATH_TYPE_PATH;

nstead of the longer, but equivalent if () .. else construction.

Signed-off-by: Peter Marschall <peter@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tools/opensc-explorer.c

    r52b601e r12fce0f  
    302302                        path->len = 2; 
    303303                        memcpy(path->value, cbuf, 2); 
    304                         if (is_id) 
    305                                 path->type = SC_PATH_TYPE_FILE_ID; 
    306                         else 
    307                                 path->type = SC_PATH_TYPE_PATH; 
     304                        path->type = (is_id) ? SC_PATH_TYPE_FILE_ID : SC_PATH_TYPE_PATH; 
    308305                } else { 
    309306                        *path = current_path; 
Note: See TracChangeset for help on using the changeset viewer.