Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -r d0d940cdc8e2 -r dd57dce3529a r0/r.cpp
- --- a/r0/r.cpp Sat Dec 06 00:20:57 2014 +0900
- +++ b/r0/r.cpp Sat Dec 06 02:44:57 2014 +0900
- @@ -181,11 +181,12 @@
- uint64_t total_ave = 0;
- for (int j = 0; j < TRANS_NUM; j++) {
- + retry:
- LONG res = card.transmit(command, commandlen);
- if (res != SCARD_S_SUCCESS) {
- std::fprintf(stderr, "retry: SCardTransmit(): %d\n", i);
- milliSleep(10);
- - continue;
- + goto retry;
- }
- // std::fprintf(stderr, "%4u: %"PRIu64"\n", j, card.elapsed());
- total_ave += card.elapsed();
- @@ -242,7 +243,7 @@
- static void number2code(char *out, uint32_t x)
- {
- static const char tbl[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- - const int n = sizeof(tbl);
- + const int n = sizeof(tbl) - 1;
- int i = 0;
- while (x) {
- out[i++] = tbl[x % n];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement