Skip to content

Commit

Permalink
Prefer fputc over fputs where possible
Browse files Browse the repository at this point in the history
fputc is meant for single characters, fputs is meant for strings.
  • Loading branch information
RSilicon committed Jul 16, 2023
1 parent 20b768f commit 3f1a0c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ssh-keyscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ keyprint_one(const char *host, struct sshkey *key)
if (!get_cert)
r = fprintf(stdout, "%s ", known_host);
if (r >= 0 && sshkey_write(key, stdout) == 0)
(void)fputs("\n", stdout);
(void)fputc('\n', stdout);
free(hashed);
free(hostport);
}
Expand Down
4 changes: 2 additions & 2 deletions sshkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -2717,7 +2717,7 @@ sshkey_dump_ec_point(const EC_GROUP *group, const EC_POINT *point)
BN_print_fp(stderr, x);
fputs("\ny=", stderr);
BN_print_fp(stderr, y);
fputs("\n", stderr);
fputc('\n', stderr);
out:
BN_clear_free(x);
BN_clear_free(y);
Expand All @@ -2735,7 +2735,7 @@ sshkey_dump_ec_key(const EC_KEY *key)
fputs("(NULL)", stderr);
else
BN_print_fp(stderr, EC_KEY_get0_private_key(key));
fputs("\n", stderr);
fputc('\n', stderr);
}
#endif /* WITH_OPENSSL && OPENSSL_HAS_ECC */

Expand Down

0 comments on commit 3f1a0c5

Please sign in to comment.