I don't think you were in the wrong per se, but I do think shooting a dog without knowing it's true intentions is a bad thing. if a dog wanted to attack and bite you it would have, immediately. you prepared yourself for the worst and luckily you didn't pull the trigger. I'm a dog owner and live in a very dog friendly neighborhood. i've had a lot of dogs bark at me, but I never perceived a threat to my well-being. I think you have to take it on a case by case scenario. i'd say the vast majority of dogs won't bite but making any gesture, whether it be pulling your gun or trying to shoo the dog away, could be perceived as a threat by the dog. I think the best thing you could do in this situation is to remain calm and stand still. if the dog makes any attempt to attack you then you might have reason to shoot it. you have to remember, they're dogs and dogs bark a lot - just because one barks at you doesn't mean he wants to eat you for dinner.