init_om: remove unneeded extra copy of string to local buffer
Strings from the supported_charset_list[] were being copied one by
one to a stack buffer, and then strdup called on that buffer.
Instead, just strdup the original string, without the local copy,
and use a more traditional for loop, so it's easier to figure out
what the code is doing (cleaning up a gcc const-cast warning in
the process).
Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by:
Matthieu Herrb <matthieu.herrb@laas.fr>
Backported-to-NX-by:
Ulrich Sibiller <uli42@gmx.de>
Showing
Please
register
or
sign in
to comment