Skip to content

Commit 6885402

Browse files
Merge pull request #609 from AtariDreams/redundant
Remove redundant checks
2 parents a6d91a2 + 16a8f18 commit 6885402

5 files changed

Lines changed: 6 additions & 8 deletions

File tree

backend/usb-darwin.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,8 +1809,7 @@ static CFStringRef copy_printer_interface_indexed_description(printer_interface_
18091809
if (description[1] != kUSBStringDesc)
18101810
return NULL;
18111811

1812-
if ((description[0] & 1) != 0)
1813-
description[0] &= ~1;
1812+
description[0] &= ~1;
18141813

18151814
if (description[0] < 2)
18161815
return CFSTR("");

cups/tls-darwin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ httpCredentialsString(
793793
if (!buffer)
794794
return (0);
795795

796-
if (buffer && bufsize > 0)
796+
if (bufsize > 0)
797797
*buffer = '\0';
798798

799799
if ((first = (http_credential_t *)cupsArrayFirst(credentials)) != NULL &&

cups/tls-sspi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ httpCredentialsString(
324324
if (!buffer)
325325
return (0);
326326

327-
if (buffer && bufsize > 0)
327+
if (bufsize > 0)
328328
*buffer = '\0';
329329

330330
cert = http_sspi_create_credential(first);

filter/rastertoepson.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,11 +462,10 @@ CompressData(const unsigned char *line, /* I - Data to compress */
462462
*comp_ptr++ = temp;
463463

464464
/*
465-
* Check the last bit in the current byte and the first bit in the
466-
* next byte...
465+
* Check the last bit in the current byte...
467466
*/
468467

469-
if ((temp & 0x01) && comp_ptr < line_end && *comp_ptr & 0x80)
468+
if ((temp & 0x01) && comp_ptr < line_end)
470469
*comp_ptr &= 0x7f;
471470
}
472471
}

scheduler/type.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ mimeAddTypeRule(mime_type_t *mt, /* I - Type to add to */
221221
else if (*rule == '+' && current != NULL)
222222
{
223223
if (logic != MIME_MAGIC_AND &&
224-
current != NULL && current->prev != NULL)
224+
current->prev != NULL)
225225
{
226226
/*
227227
* OK, we have more than 1 rule in the current tree level... Make a

0 commit comments

Comments
 (0)