If you have a selection in Photoshop that you want to expand, but you don’t want to have
the rounded corners you get with the expand command ( Select > Modify > Expand… ).
Then you can use this quick tip to keep the corners straight.
Make your selection like you would otherwise make.

The initial selection
Go into the quick mask mode ( Select > Edit in Quick Mask Mode, or press Q )

The selection in quick mask mode
then either use the Maximum ( Filter > Other > Maximum ),
or the Minimum command ( Filter > Other > Minimum )
to expand or contract your selection.

The Maximum dialog box
After you have modified your selection you can exit the quick mask mode
by again going to Select > Edit in Quick Mask Mode, or by pressing Q.
Your selection will have expanded/contracted without rounded corners.

The final expanded selection with square corners !
Another plus of this method is that you can easily see the amount
with which you are expanding / contracting the selection with.