Little fix for valgrind reports uninitialised byte(s) in bind call.

pull/76/head
Tom Nicklin 2018-03-24 19:02:24 +00:00
parent c7266ff148
commit f8dcc0f8ba
No known key found for this signature in database
GPG Key ID: FF7FBDAF6C0EE8E1
1 changed files with 1 additions and 3 deletions

View File

@ -138,8 +138,6 @@ int main(int argc, char **argv)
/* little (really a very little!) CPU usage. */ /* little (really a very little!) CPU usage. */
setsockopt(s, SOL_CAN_RAW, CAN_RAW_FILTER, NULL, 0); setsockopt(s, SOL_CAN_RAW, CAN_RAW_FILTER, NULL, 0);
// bzero(&addr,sizeof(struct sockaddr_can)); //zero out the struct
if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) { if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
perror("bind"); perror("bind");
return 1; return 1;