Two things I wish to say about the original inquiry and the following replies.
One, something that was never mentioned but should be, make sure that you are using purchased black walnut products NEVER use or feed an animal, especially dogs or horses, black walnuts. The walnut itself is fine but they tend to easily and quickly develop a mold that is toxic.
Second, as to the use of garlic, I feel the best way to provide this is actually in a product developed for pets called Brewer's yeast. You can even get this product at Walmart, although I find the ones sold by most pet stores tend to be a bit better quality. Brewer's yeast not only has the garlic to help with the fleas it has a lot of other products that help with worms, coats, digestion, teeth, etc. Pretty much the entire system. It can be used with both cats and dogs.