system
(system)
February 3, 2005, 6:26pm
1
hermarcel wrote on Thursday, February 03, 2005 :
Just a minor thing…
In prvInitialiseTCBVariables() the taskname is copied to the tcb after verifying it’s length. When it fits a strcpy is used, otherwise a strncpy.
I think it simplifies the code (and save some cycles, too) when the test is removed and the strncpy is always used.
rtel
(Richard Barry)
February 3, 2005, 6:32pm
2
rtel wrote on Thursday, February 03, 2005 :
Good point! I’ve added it to the list.
Regards.
system
(system)
February 4, 2005, 3:37pm
3
hermarcel wrote on Friday, February 04, 2005 :
It would be neat, I think, if a \0 was always put in the last char of the taskname. Then, when a taskname is too long to fit, it still is a properly terminated string.
The strncpy should copy "maxlen - 1" chars.