Update relay.c

fix compiling errors