diff --git a/src/controller/AutoCommissioner.cpp b/src/controller/AutoCommissioner.cpp index b677244a053896..f2aaadc8652a2e 100644 --- a/src/controller/AutoCommissioner.cpp +++ b/src/controller/AutoCommissioner.cpp @@ -213,10 +213,10 @@ CHIP_ERROR AutoCommissioner::SetCommissioningParameters(const CommissioningParam // This buffer is statically allocated and is of size kMaxDefaultNtpSize. auto span = MutableCharSpan(mDefaultNtp, kMaxDefaultNtpSize); CopyCharSpanToMutableCharSpan(params.GetDefaultNTP().Value().Value(), span); - app::DataModel::Nullable default_ntp(CharSpan(mDefaultNtp, size)); + auto default_ntp = MakeNullable(CharSpan(mDefaultNtp, size)); mParams.SetDefaultNTP(default_ntp); } else { - mParams.SetDefaultNTP(app::DataModel::Nullable()); + mParams.SetDefaultNTP(NullNullable); } }