mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01: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
@@ -171,7 +171,7 @@ class Genode::Root_component : public Rpc_object<Typed_root<SESSION_TYPE> >,
|
||||
*/
|
||||
enum { MAX_ARGS_LEN = 256 };
|
||||
char adjusted_args[MAX_ARGS_LEN];
|
||||
strncpy(adjusted_args, args.string(), sizeof(adjusted_args));
|
||||
copy_cstring(adjusted_args, args.string(), sizeof(adjusted_args));
|
||||
|
||||
Arg_string::set_arg(adjusted_args, sizeof(adjusted_args),
|
||||
"ram_quota", String<64>(remaining_ram_quota).string());
|
||||
|
||||
Reference in New Issue
Block a user