Skip to content

Commit

Permalink
style/code: remove unnecessary trailing whitespace
Browse files Browse the repository at this point in the history
N/A

Signed-off-by: chao.an <anchao@xiaomi.com>
  • Loading branch information
anchao authored and Ouss4 committed Nov 28, 2020
1 parent d64929d commit b5692d8
Show file tree
Hide file tree
Showing 8 changed files with 315 additions and 315 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ SYMTABOBJ = $(SYMTABSRC:.c=$(OBJEXT))
all:
$(RM) $(BIN)
$(MAKE) $(BIN)

.PHONY: import install dirlinks export .depdirs preconfig depend clean distclean
.PHONY: context clean_context context_all register register_all
.PRECIOUS: $(BIN)
Expand Down Expand Up @@ -106,7 +106,7 @@ $(SYMTABSRC): $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_all)
$(Q) for app in ${CONFIGURED_APPS}; do \
$(MAKE) -C "$${app}" archive ; \
done
$(Q) $(MAKE) install
$(Q) $(MAKE) install
$(Q) $(APPDIR)$(DELIM)tools$(DELIM)mksymtab.sh $(BINDIR) >$@.tmp
$(Q) $(call TESTANDREPLACEFILE, $@.tmp, $@)

Expand Down
18 changes: 9 additions & 9 deletions canutils/candump/candump.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static __u32 dropcnt[MAXSOCK];
static __u32 last_dropcnt[MAXSOCK];
static char devname[MAXIFNAMES][IFNAMSIZ+1];
static int dindex[MAXIFNAMES];
static int max_devname_len; /* to prevent frazzled device name output */
static int max_devname_len; /* to prevent frazzled device name output */
const int canfd_on = 1;

#define MAXANI 4
Expand Down Expand Up @@ -249,7 +249,7 @@ int main(int argc, char **argv)
struct timeval timeout, timeout_config = { 0, 0 }, *timeout_current = NULL;
FILE *logfile = NULL;

#if 0 /* NuttX doesn't support these signals */
#if 0 /* NuttX doesn't support these signals */
signal(SIGTERM, sigterm);
signal(SIGHUP, sigterm);
#endif
Expand Down Expand Up @@ -360,7 +360,7 @@ int main(int argc, char **argv)
print_usage(basename(argv[0]));
exit(0);
}

if (logfrmt && view) {
fprintf(stderr, "Log file format selected: Please disable ASCII/BINARY/SWAP options!\n");
exit(0);
Expand Down Expand Up @@ -458,14 +458,14 @@ int main(int argc, char **argv)
nptr = strchr(ptr, ','); /* update exit condition */

if (sscanf(ptr, "%" SCNx32 ":%" SCNx32,
&rfilter[numfilter].can_id,
&rfilter[numfilter].can_id,
&rfilter[numfilter].can_mask) == 2) {
rfilter[numfilter].can_mask &= ~CAN_ERR_FLAG;
if (*(ptr+8) == ':')
rfilter[numfilter].can_id |= CAN_EFF_FLAG;
numfilter++;
} else if (sscanf(ptr, "%" SCNx32 "~%" SCNx32,
&rfilter[numfilter].can_id,
&rfilter[numfilter].can_id,
&rfilter[numfilter].can_mask) == 2) {
rfilter[numfilter].can_id |= CAN_INV_FILTER;
rfilter[numfilter].can_mask &= ~CAN_ERR_FLAG;
Expand Down Expand Up @@ -635,7 +635,7 @@ int main(int argc, char **argv)
/* these settings may be modified by recvmsg() */
iov.iov_len = sizeof(frame);
msg.msg_namelen = sizeof(addr);
msg.msg_controllen = sizeof(ctrlmsg);
msg.msg_controllen = sizeof(ctrlmsg);
msg.msg_flags = 0;

nbytes = recvmsg(s[i], &msg, 0);
Expand All @@ -661,7 +661,7 @@ int main(int argc, char **argv)

if (count && (--count == 0))
running = 0;

for (cmsg = CMSG_FIRSTHDR(&msg);
cmsg && (cmsg->cmsg_level == SOL_SOCKET);
cmsg = CMSG_NXTHDR(&msg,cmsg)) {
Expand Down Expand Up @@ -732,7 +732,7 @@ int main(int argc, char **argv)
}
goto out_fflush; /* no other output to stdout */
}

printf(" %s", (color>2)?col_on[idx%MAXCOL]:"");

switch (timestamp) {
Expand Down Expand Up @@ -768,7 +768,7 @@ int main(int argc, char **argv)
diff.tv_sec = diff.tv_usec = 0;
printf("(%03ju.%06ld) ",
(uintmax_t)diff.tv_sec, diff.tv_usec);

if (timestamp == 'd')
last_tv = tv; /* update for delta calculation */
}
Expand Down
2 changes: 1 addition & 1 deletion canutils/cansend/cansend.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void print_usage_send(char *prg)

int main(int argc, char **argv)
{
int s; /* can raw socket */
int s; /* can raw socket */
int required_mtu;
int mtu;
int enable_canfd = 1;
Expand Down
4 changes: 2 additions & 2 deletions canutils/libcanutils/lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
#include <stdio.h>

/* Compatibility for NuttX */
typedef uint8_t __u8;
typedef uint32_t __u32;
typedef uint8_t __u8;
typedef uint32_t __u32;

/* buffer sizes for CAN frame string representations */

Expand Down
Loading

0 comments on commit b5692d8

Please sign in to comment.