psas / stm32

PSAS STM32F4xx firmware development.
30 stars 20 forks source link

Not checking return value >=0 from get_udp_socket(...) from util_sockets.c #44

Closed kwilsonpdx closed 10 years ago

kwilsonpdx commented 10 years ago

As an example in flight-rnh:

// Set up sockets 157 battery_socket = get_udp_socket(RNH_BATTERY_ADDR); 158 port_socket = get_udp_socket(RNH_PORT_ADDR);

int get_udp_socket(const struct sockaddr *addr);

get_udp_socket returns a -1 or -2 depending on the error. Maybe get_udp_socket should have an error pointer in the argument list?