Application of Closing Costs

For the sale of a second home resulting in a gain, are the following basics correct with regard to how closing costs are typically applied?  :

 

- The basis should be adjusted for those closing costs attributed to the PURCHASE of the home, effectively reducing the gain.

- The closing costs on the SALE of the home should be included in the seller expenses, which are then applied as an adjustment (code 'E') on the 8949, effectively reducing the gain.

 

SE