hplip/hplip-strstr-const.patch
Petr Šabata 3b7ae335f3 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/hplip#7cb6f648cdb35a0f018b511d10b516d6d9e4d638
2020-10-15 12:26:13 +02:00

51 lines
2.3 KiB
Diff

diff -up hplip-3.9.6b/prnt/hpijs/dj3320.cpp.strstr-const hplip-3.9.6b/prnt/hpijs/dj3320.cpp
--- hplip-3.9.6b/prnt/hpijs/dj3320.cpp.strstr-const 2009-06-25 21:02:29.000000000 +0100
+++ hplip-3.9.6b/prnt/hpijs/dj3320.cpp 2009-07-27 16:14:52.868542337 +0100
@@ -405,7 +405,7 @@ DISPLAY_STATUS DJ3320::ParseError (BYTE
{
DRIVER_ERROR err = NO_ERROR;
BYTE byDevIDBuffer[DevIDBuffSize];
- char *pcStr = NULL;
+ const char *pcStr = NULL;
BYTE byStatus1, byStatus2;
memset(byDevIDBuffer, 0, sizeof(byDevIDBuffer));
diff -up hplip-3.9.6b/prnt/hpijs/registry.cpp.strstr-const hplip-3.9.6b/prnt/hpijs/registry.cpp
--- hplip-3.9.6b/prnt/hpijs/registry.cpp.strstr-const 2009-06-25 21:02:29.000000000 +0100
+++ hplip-3.9.6b/prnt/hpijs/registry.cpp 2009-07-27 16:18:41.583417187 +0100
@@ -290,14 +290,14 @@ DRIVER_ERROR DeviceRegistry::SelectDevic
err = pSS->GetDeviceID(DevIDBuffer, DevIDBuffSize, FALSE);
ERRCHECK; // should be either NO_ERROR or BAD_DEVICE_ID
- char *cmdStr = (char *) strstr ((const char *) DevIDBuffer+2, "CMD:");
+ char *cmdStr = strstr ((char *) DevIDBuffer+2, "CMD:");
char *cmdStrEnd;
if ((strstr((const char *) DevIDBuffer+2,"CMD:LDL")))
{
device = eDJ3320;
match = TRUE;
}
- if (!match && cmdStr && (cmdStrEnd = (char *) strstr (cmdStr, ";")))
+ if (!match && cmdStr && (cmdStrEnd = strstr (cmdStr, ";")))
{
*cmdStrEnd = '\0';
if (strstr (cmdStr, "LDL"))
@@ -309,12 +309,12 @@ DRIVER_ERROR DeviceRegistry::SelectDevic
}
if (!match && !cmdStr)
{
- cmdStr = (char *) strstr ((const char *) DevIDBuffer+2, "COMMAND SET:");
+ cmdStr = strstr ((char *) DevIDBuffer+2, "COMMAND SET:");
}
- if (!match && cmdStr && (strstr ((const char *) cmdStr+4, "POSTSCRIPT") ||
- strstr ((const char *) cmdStr+4, "PostScript") ||
- strstr ((const char *) cmdStr+4, "Postscript") ||
- strstr ((const char *) cmdStr+4, "postscript") ))
+ if (!match && cmdStr && (strstr (cmdStr+4, "POSTSCRIPT") ||
+ strstr (cmdStr+4, "PostScript") ||
+ strstr (cmdStr+4, "Postscript") ||
+ strstr (cmdStr+4, "postscript") ))
{
device = ePScript;
match = TRUE;