修改不规范代码

Signed-off-by: 张智勇 <zhangzhiyong43@huawei.com>
This commit is contained in:
张智勇 2024-10-30 17:01:01 +08:00
parent efdec8711a
commit 51482f5eba
2 changed files with 6 additions and 1 deletions

View File

@ -28,6 +28,11 @@ bool PrintCallbackProxy::OnCallback()
MessageOption option;
data.WriteInterfaceToken(GetDescriptor());
auto remote = Remote();
if (remote == nullptr) {
PRINT_HILOGE("SendRequest failed, error: remote is null");
return false;
}
int error = Remote()->SendRequest(PRINT_CALLBACK_TASK, data, reply, option);
if (error != 0) {
PRINT_HILOGE("SendRequest failed, error %{public}d", error);

View File

@ -639,7 +639,7 @@ bool PrintSystemData::ConvertJsonToPrintMargin(nlohmann::json &capsJson, Printer
return false;
}
minMargin.SetTop(marginJson["top"].get<uint32_t>());
minMargin.SetTop(marginJson["bottom"].get<uint32_t>());
minMargin.SetBottom(marginJson["bottom"].get<uint32_t>());
minMargin.SetLeft(marginJson["left"].get<uint32_t>());
minMargin.SetRight(marginJson["right"].get<uint32_t>());
printerCapability.SetMinMargin(minMargin);