You should have some initial condition T(1) = b for some constant b. Then T(2^k) = b + kc. If n = 2^k, then k = log(n) (logarithm to the base 2). Therefore, T(n) = b + c*log(n) = O(log(n)).

When n is not a power of 2, then the solution depends on whether / is regular division or integer division (which throws away the remainder). In the first case, you need more initial conditions to define T(n) for all n; in fact, you need to know T(n) for all odd natural numbers n. In the second case, I think you can prove that T(n) is monotonic (not necessarily strictly) and you can still have the O(log(n)) bound.