Right for whom? Have you shot either of them? If not, see whether your local ranges have one for rent one. Don't put too much faith in what other people have to say, unless they're going to pay for it for you. Regardless of which brand (of anything) you inquire about, there will be mindless bashers who parrot what they think the "cool" people say. (Buy Chevy, Ford sucks,etc)
As long as you stay away from the California white metal guns, you'll do fine.
Find a gun that fits your hand, meets your requirements, and is of a caliber that you can shoot accurately. If push comes to shove, buy some snap caps in the caliber you want, and ask your dealer if you may try the trigger(s).
The Glock lovers will say "27". The S&W lovers will say "M&P40c".
Go to other forums and lurk around to see what the people have to say about the guns they like. There are gun specific forums for both S&W and Glock. Go see what the shortcomings are from those owners. I have several guns under consideration for a CCW piece and have been lurking at the Forums for those makes. They all have strong, and weak points.
O.K. Im off the soap box. Get to work.