FreeCalypso > hg > fc-pcsc-tools
comparison simtool/plmnsel.c @ 197:3ddbc3fea5f0
encode_plmn_3bytes() error handling change
in preparation for PLMN list reading addition
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 07 Mar 2021 02:36:27 +0000 |
parents | 32acef9d20ff |
children | 3bde063234aa |
comparison
equal
deleted
inserted
replaced
196:c804f2f8c138 | 197:3ddbc3fea5f0 |
---|---|
108 if (idx >= curfile_total_size / 3) { | 108 if (idx >= curfile_total_size / 3) { |
109 fprintf(stderr, "error: specified index is out of range\n"); | 109 fprintf(stderr, "error: specified index is out of range\n"); |
110 return(-1); | 110 return(-1); |
111 } | 111 } |
112 rc = encode_plmn_3bytes(argv[2], rec); | 112 rc = encode_plmn_3bytes(argv[2], rec); |
113 if (rc < 0) | 113 if (rc < 0) { |
114 fprintf(stderr, "error: invalid MCC-MNC argument\n"); | |
114 return(rc); | 115 return(rc); |
116 } | |
115 return update_bin_op(idx * 3, rec, 3); | 117 return update_bin_op(idx * 3, rec, 3); |
116 } | 118 } |
117 | 119 |
118 cmd_plmnsel_erase(argc, argv) | 120 cmd_plmnsel_erase(argc, argv) |
119 char **argv; | 121 char **argv; |