Skip to content

Commit 9842b92

Browse files
committed
src/actions/transformations/hex_decode.cc: reduce the scope of variable in a for () loop
In general, it is always preferable to reduce the scope of a variable in a for loop
1 parent 734646d commit 9842b92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/actions/transformations/hex_decode.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ std::string HexDecode::evaluate(const std::string &value,
5858

5959
int HexDecode::inplace(unsigned char *data, int len) {
6060
unsigned char *d = data;
61-
int i, count = 0;
61+
int count = 0;
6262

6363
if ((data == NULL) || (len == 0)) {
6464
return 0;
6565
}
6666

67-
for (i = 0; i <= len - 2; i += 2) {
67+
for (int i = 0;i <= len - 2;i += 2) {
6868
*d++ = utils::string::x2c(&data[i]);
6969
count++;
7070
}

0 commit comments

Comments
 (0)