remove unnecessary variable
follow-up to fname_decode() routine
This commit is contained in:
+2
-3
@@ -204,7 +204,6 @@ int bufsz;
|
|||||||
char *sp, *op;
|
char *sp, *op;
|
||||||
int k,calc,cnt = 0;
|
int k,calc,cnt = 0;
|
||||||
char hexdigits[] = "0123456789ABCDEF";
|
char hexdigits[] = "0123456789ABCDEF";
|
||||||
int hexvalues[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
|
|
||||||
|
|
||||||
sp = s;
|
sp = s;
|
||||||
op = callerbuf;
|
op = callerbuf;
|
||||||
@@ -218,11 +217,11 @@ int bufsz;
|
|||||||
sp++;
|
sp++;
|
||||||
for (k=0; k < 15; ++k) if (*sp == hexdigits[k]) break;
|
for (k=0; k < 15; ++k) if (*sp == hexdigits[k]) break;
|
||||||
if (k >= 15) return callerbuf; /* impossible, so bail */
|
if (k >= 15) return callerbuf; /* impossible, so bail */
|
||||||
calc = hexvalues[k] << 4;
|
calc = k << 4;
|
||||||
sp++;
|
sp++;
|
||||||
for (k=0; k < 15; ++k) if (*sp == hexdigits[k]) break;
|
for (k=0; k < 15; ++k) if (*sp == hexdigits[k]) break;
|
||||||
if (k >= 15) return callerbuf; /* impossible, so bail */
|
if (k >= 15) return callerbuf; /* impossible, so bail */
|
||||||
calc += hexvalues[k];
|
calc += k;
|
||||||
sp++;
|
sp++;
|
||||||
*op++ = calc;
|
*op++ = calc;
|
||||||
*op = '\0';
|
*op = '\0';
|
||||||
|
|||||||
Reference in New Issue
Block a user