Skip to content

Commit

Permalink
fix whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsracz committed Sep 1, 2020
1 parent 10ce4bd commit 02aea79
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions applications/hub/main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ bool timestamped = false;
bool export_mdns = false;
const char* mdns_name = "openmrn_hub";
bool printpackets = false;
const char* socketcan_port = nullptr;
const char *socketcan_port = nullptr;

void usage(const char *e)
{
Expand Down Expand Up @@ -135,11 +135,11 @@ void parse_args(int argc, char *argv[])
case 'l':
printpackets = true;
break;
#if defined(__linux__)
#if defined(__linux__)
case 's':
socketcan_port = optarg;
break;
#endif
#endif
default:
fprintf(stderr, "Unknown option %c\n", opt);
usage(argv[0]);
Expand Down Expand Up @@ -174,7 +174,7 @@ int appl_main(int argc, char *argv[])
mdns_publish(mdns_name, port);
}
#endif
#if defined(__linux__)
#if defined(__linux__)
if (socketcan_port)
{
int s = socketcan_open(socketcan_port, 1);
Expand All @@ -189,7 +189,7 @@ int appl_main(int argc, char *argv[])
}
}
#endif

if (upstream_host)
{
connections.emplace_back(new UpstreamConnectionClient(
Expand Down
4 changes: 2 additions & 2 deletions src/utils/SocketCan.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@

#if defined(__linux__)

#include <errno.h>
#include <linux/sockios.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <stdio.h>
#include <sys/ioctl.h>

/// This macro executes an OS call, and if it returns negative result, then
/// prints the errno to stderr, and terminates the current function with -1
Expand Down
2 changes: 1 addition & 1 deletion src/utils/SocketCan.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
/// @param loopback 1 to enable loopback locally to other open references,
/// 0 to disable loopback locally to other open references.
/// @return an open socket file descriptor, or -1 if there was an error.
int socketcan_open(const char* device, int loopback);
int socketcan_open(const char *device, int loopback);

#endif

Expand Down

0 comments on commit 02aea79

Please sign in to comment.