]> git.ipfire.org Git - thirdparty/hostap.git/commit - wpa_supplicant/config.c
Clean up array insertion to skip unnecessary memmove
authorJouni Malinen <j@w1.fi>
Sun, 19 Feb 2012 14:44:30 +0000 (16:44 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 19 Feb 2012 14:44:30 +0000 (16:44 +0200)
commit2c60ca73912fe30344df072ca6447f1a4dcdb67b
tree8cef4df9b6ae30f481ebd4fdcfc1a263b8390784
parentf4b2d69b0760767f1667e801ef1c34642e21b60c
Clean up array insertion to skip unnecessary memmove

The previous elements need to be moved only if we are inserting the new
network in the middle of the list. While the memmove of zero bytes at
the end of the array does not cause real problems, some static analyzers
complain about this, so in addition to slightly optimized
implementation, this removes some analyzer warnings, too.

Signed-hostap: Jouni Malinen <j@w1.fi>
wpa_supplicant/config.c