Huw Davies (@huw) commented about dlls/localspl/provider.c:
- if (info->pDatatype)
datatype = info->pDatatype;
- else if (printer->datatype)
datatype = printer->datatype;
- else
datatype = printer->info->datatype;
- if (!datatype || printer->info->attributes & PRINTER_ATTRIBUTE_RAW_ONLY)
- {
if (!datatype || wcsicmp(datatype, L"RAW"))
{
TRACE("non RAW datatype specified on RAW-only printer (%s)\n", debugstr_w(datatype));
SetLastError(ERROR_INVALID_DATATYPE);
return 0;
}
- }
Is there more code to go in here or could it be simplified to:
```suggestion:-8+0 if (!datatype || ((printer->info->attributes & PRINTER_ATTRIBUTE_RAW_ONLY) && wcsicmp(datatype, L"RAW"))) { TRACE("non RAW datatype specified on RAW-only printer (%s)\n", debugstr_w(datatype)); SetLastError(ERROR_INVALID_DATATYPE); return 0; } ```