I believe that you end up printing out the result of the assignment here instead of the netmask.