Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/ieee1284.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ backendGetDeviceID(
* bytes. The 1284 spec says the length is stored MSB first...
*/

length = (int)((((unsigned)device_id[0] & 255) << 8) + ((unsigned)device_id[1] & 255));
length = (int)((((unsigned)device_id[0] & 255) << 8) | ((unsigned)device_id[1] & 255));

/*
* Check to see if the length is larger than our buffer; first
Expand All @@ -166,7 +166,7 @@ backendGetDeviceID(
*/

if (length > device_id_size || length < 14)
length = (int)((((unsigned)device_id[1] & 255) << 8) + ((unsigned)device_id[0] & 255));
length = (int)((((unsigned)device_id[1] & 255) << 8) | ((unsigned)device_id[0] & 255));

if (length > device_id_size)
length = device_id_size;
Expand Down
2 changes: 1 addition & 1 deletion cups/dest-options.c
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,7 @@ cups_collection_string(
const ipp_uchar_t *date = ippGetDate(member, j);
/* Date value */

year = ((unsigned)date[0] << 8) + (unsigned)date[1];
year = (date[0] << 8) | date[1];

if (date[9] == 0 && date[10] == 0)
snprintf(temp, sizeof(temp), "%04u-%02u-%02uT%02u:%02u:%02uZ", year, date[2], date[3], date[4], date[5], date[6]);
Expand Down
3 changes: 1 addition & 2 deletions scheduler/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1975,8 +1975,7 @@ get_addr_and_mask(const char *value, /* I - String from config file */
mask + 3) != 4)
return (0);

mask[3] |= ((unsigned)mask[0] << 24) | ((unsigned)mask[1] << 16) |
((unsigned)mask[2] << 8);
mask[3] |= (mask[0] << 24) | (mask[1] << 16) | (mask[2] << 8);
mask[0] = mask[1] = mask[2] = 0;
}
else
Expand Down