Skip to content

Commit 5962d57

Browse files
committed
Fix-up ORs
Missed a few spots
1 parent c0e0e07 commit 5962d57

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

backend/ieee1284.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ backendGetDeviceID(
157157
* bytes. The 1284 spec says the length is stored MSB first...
158158
*/
159159

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

162162
/*
163163
* Check to see if the length is larger than our buffer; first
@@ -166,7 +166,7 @@ backendGetDeviceID(
166166
*/
167167

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

171171
if (length > device_id_size)
172172
length = device_id_size;

cups/dest-options.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,7 @@ cups_collection_string(
16211621
const ipp_uchar_t *date = ippGetDate(member, j);
16221622
/* Date value */
16231623

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

16261626
if (date[9] == 0 && date[10] == 0)
16271627
snprintf(temp, sizeof(temp), "%04u-%02u-%02uT%02u:%02u:%02uZ", year, date[2], date[3], date[4], date[5], date[6]);

scheduler/conf.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,8 +1975,7 @@ get_addr_and_mask(const char *value, /* I - String from config file */
19751975
mask + 3) != 4)
19761976
return (0);
19771977

1978-
mask[3] |= ((unsigned)mask[0] << 24) | ((unsigned)mask[1] << 16) |
1979-
((unsigned)mask[2] << 8);
1978+
mask[3] |= (mask[0] << 24) | (mask[1] << 16) | (mask[2] << 8);
19801979
mask[0] = mask[1] = mask[2] = 0;
19811980
}
19821981
else

0 commit comments

Comments
 (0)