local.c: Fix channel attributes when only shared attributes exist

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Merge branch '2014_R1' of https://github.com/analogdevicesinc/libiio into 2014_R1