Do C conditional statements always return [1 or 0], or do they return [0 or \'something other than zero\']. I ask because:
pseudo code -
f
Rather than right shifting and left shifting back again to clear the LSB, I would bitwise-and it with 0xFE:
register = register & 0xFE;
[edit: assuming register is 8 bits. If not, adapt right hand operand as necessary]
But yes, if shouldSend is a result of a conditional test then it is guaranteed by the standard to be either 0 or 1. If there's any doubt about whether shouldSend could be generated from anywhere else it would be wise to put in the sort of precaution you have, or something like
register = register | (shouldSend ? 1 : 0);