Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 miscellaneous C99 conformance fixes. #223

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion toys/pending/ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -2355,7 +2355,8 @@ static int show_rules(struct nlmsghdr *mhdr,
printf("to %s", (msg->rtm_family == AF_INET || msg->rtm_family == AF_INET6)
? inet_ntop(msg->rtm_family, RTA_DATA(attr[RTA_DST]),
toybuf, sizeof(toybuf)) : "???");
(msg->rtm_dst_len != hlen) ? printf("/%u", msg->rtm_dst_len) : xputc(' ');
if (msg->rtm_dst_len != hlen) printf("/%u", msg->rtm_dst_len);
else xputc(' ');
} else if (msg->rtm_dst_len)
printf("to 0/%d ", msg->rtm_dst_len);

Expand Down
2 changes: 1 addition & 1 deletion toys/pending/wget.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void wget_main(void)
// HTTP res code check
if (!strcmp(rc, "301") || !strcmp(rc, "302")) {
char* eol = 0;
if ((eol = strchr(redir_loc, '\r')) > 0) *eol = 0;
if ((eol = strchr(redir_loc, '\r'))) *eol = 0;
else if (redir_loc) error_exit("Could not parse redirect URL");
if (redirects < 0) error_exit("Too many redirects");

Expand Down