mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
ddns-scripts: netcup.com use json_load_file
Replace manual file loading via cat with json_load_file for parsing JSON data. This uses the intended helper function and improves code clarity and robustness. Signed-off-by: Tim Flubshi <flubshi@gmail.com>
This commit is contained in:
committed by
Florian Eckert
parent
c51e3100fa
commit
bd6a551669
@@ -127,7 +127,7 @@ netcup_check_response() {
|
||||
local __context="$1"
|
||||
local __status __statuscode __shortmsg
|
||||
|
||||
json_load "$(cat "$DATFILE")"
|
||||
json_load_file "$DATFILE"
|
||||
json_get_var __status "status"
|
||||
json_get_var __statuscode "statuscode"
|
||||
json_get_var __shortmsg "shortmessage"
|
||||
|
||||
Reference in New Issue
Block a user