Just to clear up the many misconceptions out there about garlic, it is safe for dogs in moderation. I have fed it to all 5 of mine since they were pups, all eat a home cooked diet with about the equivalent of 1/2 clove each per day, and typically do not get fleas or worms, unless it's a very bad year for fleas. 4 of them weigh between 50 and 60 pounds, the other is around 35 pounds, just for reference. Even in bad years, such as last year, they don't get many, and the fleas don't stick around very long, as they can't stand the smell of the garlic.
Onions, on the other hand, can do serious harm to your dogs! The allium content in them is much higher than in garlic, although they are from the same plant family.
The key to feeding garlic is caution and being observant. Like with any food, some dogs, or humans, might have an allergy to ANY food, so start small, observe carefully for a few days, then if they do well, continue and enjoy not using toxic flea preparations on your fur babies. :-) Also do some research on herbal preparations that you can make at home, rather than using toxic chemicals that are sold at the store, labeled "safe." I assure you they are not all that safe. The are pesticides, plain and simple.
Here's to good health!