changed code to clear out a variable before use in fnc_getnwifcfg()

This commit is contained in:
hyung-hwan 2020-01-02 03:54:46 +00:00
parent cbfe6bf628
commit 7a1f072f87
2 changed files with 2 additions and 1 deletions

View File

@ -1819,6 +1819,7 @@ static int fnc_getnwifcfg (qse_awk_rtx_t* rtx, const qse_awk_fnc_info_t* fi)
qse_awk_rtx_valtostr_out_t out;
int ret = -1;
QSE_MEMSET (&cfg, 0, QSE_SIZEOF(cfg));
out.type = QSE_AWK_RTX_VALTOSTR_CPLCPY;
out.u.cplcpy.ptr = cfg.name;
out.u.cplcpy.len = QSE_COUNTOF(cfg.name);

View File

@ -559,7 +559,7 @@ qse_size_t qse_ip6adtombs (const qse_ip6ad_t* ipad, qse_mchar_t* buf, qse_size_t
tp += qse_fmtuintmaxtombs (
tp, QSE_COUNTOF(tmp) - (tp - tmp),
words[i], 16, 0, QSE_WT('\0'), QSE_NULL);
words[i], 16, 0, QSE_MT('\0'), QSE_NULL);
}
/* Was it a trailing run of 0x00's? */