(Randy Squires/AP)

Jennifer Van Hook and Claire Altman looked at a sample of 20,000 students who began kindergarten in 1998, and checked in on their height and weight in fifth and eighth grade. They couldn’t find any significant link between higher obesity rates and schools that allowed vending machines selling snacks and soda. “The results suggest that the sale of competitive foods [which compete with traditional school foods, such as soda and snacks] in school is unassociated with weight gain among middle school children,” they write.

Policies that limit the availability of candy bars, chips and soda have become popular in recent years; 23 states place some kind of restriction on what foods can be sold in schools. Why does this study find that such policies don’t necessarily reduce childhood obesity? A lot of factors could be at play. Students that don’t have access to soda in schools tend to increase their consumption of sugary drinks at home, a 2011 study in the Archives of Pediatric and Adolescent Medicine found.

And, anecdotally, there’s evidence that when schools ban unhealthy foods, a student-run black market springs up to provide the contraband. After the Los Angeles Unified School District overhauled its nutrition program last year, bringing in fresher and healthier foods, students began bringing Flamin’ Hot Cheetos and other unhealthy foods onto campus, pretty much thwarting the healthy eating plans that school administrators had in mind.