mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-23 01:08:55 +00:00
Replace Genode::strncpy by Genode::copy_cstring
- Since Genode::strncpy is not 100% compatible with the POSIX strncpy function, better use a distinct name. - Remove bogus return value from the function, easing the potential enforcement of mandatory return-value checks later. Fixes #3752
This commit is contained in:
committed by
Christian Helmuth
parent
0f27d139bd
commit
b078224753
@ -125,8 +125,8 @@ class Log_entry
|
||||
Log_entry(Genode::Color color, const char *label, const char *log_text, const char *log_attr, int id):
|
||||
_color(color), _id(id)
|
||||
{
|
||||
Genode::strncpy(_label, label, sizeof(_label));
|
||||
Genode::strncpy(_text, log_text, sizeof(_text));
|
||||
Genode::copy_cstring(_label, label, sizeof(_label));
|
||||
Genode::copy_cstring(_text, log_text, sizeof(_text));
|
||||
|
||||
_label_len = Genode::strlen(_label);
|
||||
_text_len = Genode::strlen(_text);
|
||||
|
Reference in New Issue
Block a user