I understand you're trying to account for the edge case, but it might be better style to just specify in a comment near the constant that NBRICKS_PER_ROW cannot be less than 1?