Skip to content

Commit

Permalink
Merge pull request #589 from Tarsnap/nitpicks
Browse files Browse the repository at this point in the history
Nitpicks
  • Loading branch information
cperciva authored Oct 12, 2023
2 parents 4d60f6e + 9d35926 commit fe5d8e8
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions keygen/keygen_network.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <stdint.h>
#include <string.h>

#include "crypto.h"
#include "crypto_dh.h"
#include "crypto_verify_bytes.h"
#include "keygen.h"
Expand Down
3 changes: 2 additions & 1 deletion lib/crypto/crypto_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <stddef.h>

#include <openssl/bn.h>
#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/opensslv.h>
Expand Down Expand Up @@ -197,7 +198,7 @@ crypto_compat_RSA_export(RSA * key, const BIGNUM ** n, const BIGNUM ** e,
* Generate a key pair.
*/
RSA *
crypto_compat_RSA_generate_key()
crypto_compat_RSA_generate_key(void)
{
RSA * key;

Expand Down
3 changes: 2 additions & 1 deletion lib/crypto/crypto_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ int crypto_file_init_keys(void);

/**
* crypto_MGF1(seed, seedlen, buf, buflen):
* The MGF1 mask generation function, as specified in RFC 3447.
* The MGF1 mask generation function, as specified in RFC 3447 section B.2.1,
* using SHA256 as the hash function.
*/
void crypto_MGF1(uint8_t *, size_t, uint8_t *, size_t);

Expand Down
3 changes: 2 additions & 1 deletion lib/crypto/crypto_rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

/**
* crypto_MGF1(seed, seedlen, buf, buflen):
* The MGF1 mask generation function, as specified in RFC 3447.
* The MGF1 mask generation function, as specified in RFC 3447 section B.2.1,
* using SHA256 as the hash function.
*/
void
crypto_MGF1(uint8_t * seed, size_t seedlen, uint8_t * buf, size_t buflen)
Expand Down
2 changes: 2 additions & 0 deletions lib/netproto/netproto.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <sys/time.h>

#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
Expand Down
1 change: 1 addition & 0 deletions tar/chunks/chunks_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "chunks_internal.h"
#include "hexify.h"
#include "rwhashtab.h"
#include "storage.h"
#include "warnp.h"

#include "chunks.h"
Expand Down
1 change: 1 addition & 0 deletions tar/multitape/multitape_metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <stdlib.h>
#include <string.h>

#include "chunks.h"
#include "crypto.h"
#include "crypto_verify_bytes.h"
#include "storage.h"
Expand Down
2 changes: 2 additions & 0 deletions tar/multitape/multitape_metaindex.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
#include <stdlib.h>
#include <string.h>

#include "chunks.h"
#include "crypto.h"
#include "crypto_verify_bytes.h"
#include "storage.h"
#include "sysendian.h"
#include "warnp.h"

Expand Down
1 change: 1 addition & 0 deletions tar/multitape/multitape_recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <stdint.h>

#include "multitape_internal.h"
#include "storage.h"

#include "multitape.h"

Expand Down
1 change: 1 addition & 0 deletions tar/storage/storage_delete.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "netpacket.h"
#include "netproto.h"
#include "storage_internal.h"
#include "tsnetwork.h"
#include "warnp.h"

#include "storage.h"
Expand Down
1 change: 1 addition & 0 deletions tar/storage/storage_directory.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "netproto.h"
#include "storage_internal.h"
#include "sysendian.h"
#include "tsnetwork.h"
#include "warnp.h"

#include "storage.h"
Expand Down
1 change: 1 addition & 0 deletions tar/storage/storage_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "netproto.h"
#include "storage_internal.h"
#include "sysendian.h"
#include "tsnetwork.h"
#include "warnp.h"

#include "storage.h"
Expand Down
2 changes: 1 addition & 1 deletion tar/storage/storage_read_cache.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef STORAGE_READ_CACHE_H_
#define STORAGE_READ_CACHE_H_

#include <stdint.h>
#include <stddef.h>
#include <stdint.h>

/**
* storage_read_cache_init(void):
Expand Down
1 change: 1 addition & 0 deletions tar/storage/storage_transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "crypto_entropy.h"
#include "netpacket.h"
#include "netproto.h"
#include "tsnetwork.h"
#include "warnp.h"

#include "storage.h"
Expand Down
1 change: 1 addition & 0 deletions tar/storage/storage_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "netproto.h"
#include "storage_internal.h"
#include "tarsnap_opt.h"
#include "tsnetwork.h"
#include "warnp.h"

#include "storage.h"
Expand Down

0 comments on commit fe5d8e8

Please sign in to comment.