Buffalo man gets maximum sentence for fatal shooting