Skip to content

Commit

Permalink
Remove useless assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
flowerysong committed Oct 23, 2024
1 parent d884a4e commit 89461f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion libopenarc/arc-canon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,6 @@ arc_canon_runheaders(ARC_MESSAGE *msg)
hdrtest = &lib->arcl_hdrre;

memset(hdrset, '\0', sizeof *hdrset);
nhdrs = 0;

/* tag all header fields to be signed */
for (hdr = msg->arc_hhead;
Expand Down
3 changes: 1 addition & 2 deletions libopenarc/arc-mailparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ arc_mail_token(unsigned char *s, unsigned char *e, int *type_out,
}
else if (*p == '[')
{
token_end = p = arc_mail_matching_paren(p + 1, e, '\0', ']');
token_end = arc_mail_matching_paren(p + 1, e, '\0', ']');
token_type = '[';
if (*token_end != '\0')
token_end++;
Expand Down Expand Up @@ -372,7 +372,6 @@ arc_mail_parse(unsigned char *line, unsigned char **user_out,
*user_out = NULL;
*domain_out = NULL;

err = 0;
w = line;
e = line + strlen((char *) line);
ws = 0;
Expand Down
8 changes: 2 additions & 6 deletions libopenarc/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,7 @@ arc_genamshdr(ARC_MESSAGE *msg, struct arc_dstring *dstr, char *delim,
return (size_t) -1;
}

status = arc_base64_encode(hash, hashlen,
b64hash, sizeof b64hash);
arc_base64_encode(hash, hashlen, b64hash, sizeof b64hash);
arc_dstring_printf(dstr, ";%sbh=%s", delim, b64hash);

/* l= */
Expand Down Expand Up @@ -666,8 +665,7 @@ arc_getamshdr_d(ARC_MESSAGE *msg, size_t initial, char **buf, size_t *buflen,
len = initial;
end = which + MAXTAGNAME;

for (pv = strtok_r((char *) arc_dstring_get(tmpbuf),
DELIMITER, &ctx);
for (pv = strtok_r(arc_dstring_get(tmpbuf), DELIMITER, &ctx);
pv != NULL;
pv = strtok_r(NULL, DELIMITER, &ctx))
{
Expand Down Expand Up @@ -702,7 +700,6 @@ arc_getamshdr_d(ARC_MESSAGE *msg, size_t initial, char **buf, size_t *buflen,
}
else if (forcewrap || len + pvlen > msg->arc_margin)
{
forcewrap = false;
arc_dstring_cat(msg->arc_hdrbuf, "\r\n\t");
len = 8;

Expand Down Expand Up @@ -731,7 +728,6 @@ arc_getamshdr_d(ARC_MESSAGE *msg, size_t initial, char **buf, size_t *buflen,
{
arc_dstring_cat1(msg->arc_hdrbuf,
':');
len += 1;
arc_dstring_cat(msg->arc_hdrbuf,
"\r\n\t ");
len = 9;
Expand Down

0 comments on commit 89461f8

Please sign in to comment.