settings: Fix undefined behaviours in settings_line.c.
settings: Fix undefined behaviours in settings_line.c.

This commit fixes the source of potential undefined behaviours in
settings_line.c.

Signed-off-by: Stephanos Ioannidis <dc76e9f0c0006e8f919e0c515c66dbba3982f785@stephanos.io>

galak/zephyr,galak/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,nashif/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,finikorg/zephyr,galak/zephyr,nashif/zephyr,finikorg/zephyr,Vudentz/zephyr,Vudentz/zephyr,nashif/zephyr,Vudentz/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,galak/zephyr