修改不规范代码

Signed-off-by: 张智勇 <zhangzhiyong43@huawei.com>
This commit is contained in:
张智勇 2024-11-02 11:37:03 +08:00
parent 83561c3c8a
commit 2546b57063
3 changed files with 8 additions and 3 deletions

View File

@ -1676,8 +1676,16 @@ bool PrintCupsClient::IsPrinterExist(const char *printerUri, const char *printer
dest = printAbility_->GetNamedDest(CUPS_HTTP_DEFAULT, printerName, NULL);
if (dest != NULL) {
const char *deviceUri = cupsGetOption("device-uri", dest->num_options, dest->options);
if (deviceUri == nullptr) {
PRINT_HILOGD("deviceUri is null");
return false;
}
PRINT_HILOGD("deviceUri=%{private}s", deviceUri);
const char *makeModel = cupsGetOption("printer-make-and-model", dest->num_options, dest->options);
if (makeModel == nullptr) {
PRINT_HILOGD("makeModel is null");
return false;
}
PRINT_HILOGD("makeModel=%{private}s", makeModel);
int printerState = cupsGetIntegerOption("printer-state", dest->num_options, dest->options);
PRINT_HILOGD("printerState=%{private}d", printerState);

View File

@ -347,8 +347,6 @@ void PrintSystemData::ConvertPrinterCapabilityToJson(PrinterCapability &printerC
ConvertPrintMarginToJson(printerCapability, capsJson);
}
ConvertPageSizeToJson(printerCapability, capsJson);
if (printerCapability.HasResolution()) {
ConvertPrintResolutionToJson(printerCapability, capsJson);
}

View File

@ -110,7 +110,6 @@ void PrintUsbManager::RefreshUsbPrinterDevice()
std::string PrintUsbManager::GetProductName(UsbDevice &usbDevice)
{
PRINT_HILOGI("getProductName dev.GetName() = %{public}s.", usbDevice.GetName().c_str());
USBDevicePipe usbDevicePipe;
int32_t openDeviceRet = UEC_OK;
if (isUsbEnable) {