Changeset 61855eb in OpenSC


Ignore:
Timestamp:
06/11/11 07:33:30 (12 months ago)
Author:
Peter Marschall <peter@…>
Branches:
master, staging
Children:
1c437c04
Parents:
291ec6b
git-author:
Peter Marschall <peter@…> (06/02/11 14:19:38)
git-committer:
Peter Marschall <peter@…> (06/11/11 07:33:30)
Message:

opensc-explorer: remove unnecessary var's in do_update_*()

The variables "in_str" in do_update_binary() & do_update_record()
do not serve a purpose: use argv[x] directly & remove them.

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

File:
1 edited

Legend:

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

    r291ec6b r61855eb  
    11001100        sc_path_t path; 
    11011101        sc_file_t *file; 
    1102         char *in_str; 
    11031102 
    11041103        if (argc != 3) 
     
    11081107        offs = strtol(argv[1],NULL,10); 
    11091108 
    1110         in_str = argv[2]; 
    1111         printf("in: %i; %s\n", offs, in_str); 
    1112  
    1113         r = parse_string_or_hexdata(in_str, buf, &buflen); 
     1109        printf("in: %i; %s\n", offs, argv[2]); 
     1110 
     1111        r = parse_string_or_hexdata(argv[2], buf, &buflen); 
    11141112        if (r < 0) { 
    11151113                printf("unable to parse data\n"); 
     
    11521150        sc_path_t path; 
    11531151        sc_file_t *file; 
    1154         char *in_str; 
    11551152 
    11561153        if (argc != 4) 
     
    11611158        offs = strtol(argv[2],NULL,10); 
    11621159 
    1163         in_str = argv[3]; 
    1164         printf("in: %i; %i; %s\n", rec, offs, in_str); 
     1160        printf("in: %i; %i; %s\n", rec, offs, argv[3]); 
    11651161 
    11661162        r = sc_select_file(card, &path, &file); 
     
    11851181 
    11861182        buflen = sizeof(buf) - offs; 
    1187         i = parse_string_or_hexdata(in_str, buf + offs, &buflen); 
     1183        i = parse_string_or_hexdata(argv[3], buf + offs, &buflen); 
    11881184        if (!i) { 
    11891185                printf("unable to parse data\n"); 
Note: See TracChangeset for help on using the changeset viewer.