File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ MacAddress8::MacAddress8(const uint8_t *macbytearray) {
15
15
}
16
16
17
17
// Parse user entered string into MAC address
18
- bool MacAddress8::fromCStr (const char *buf) { // TODO test this!
18
+ bool MacAddress8::fromCStr (const char *buf) {
19
19
char cs[24 ];
20
20
char *token;
21
21
char *next; // Unused but required
@@ -24,11 +24,11 @@ bool MacAddress8::fromCStr(const char *buf) { //TODO test this!
24
24
strncpy (cs, buf, sizeof (cs)); // strtok modifies the buffer: copy to working buffer.
25
25
26
26
for (i=0 ; i<sizeof (_mac.bytes ); i++) {
27
- token = strtok ( (i==0 ) ? cs : NULL , " :" ); // Find first or next token
27
+ token = strtok ((i==0 ) ? cs : NULL , " :" ); // Find first or next token
28
28
if (!token) { // No more tokens found
29
29
return false ;
30
30
}
31
- _mac.bytes [i] = strtol ( token, &next, 16 );
31
+ _mac.bytes [i] = strtol (token, &next, 16 );
32
32
}
33
33
return true ;
34
34
}
@@ -73,4 +73,4 @@ MacAddress8& MacAddress8::operator=(uint64_t macval)
73
73
{
74
74
_mac.val = macval;
75
75
return *this ;
76
- }
76
+ }
You can’t perform that action at this time.
0 commit comments