Skip to content

Commit

Permalink
pre merge
Browse files Browse the repository at this point in the history
  • Loading branch information
noel2004 committed Nov 10, 2017
1 parent 1f26ee4 commit 830f284
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 7 deletions.
1 change: 1 addition & 0 deletions bitcoin/signature.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <stdbool.h>
#include <stddef.h>

struct sha256_double;
struct bitcoin_tx;
Expand Down
1 change: 1 addition & 0 deletions btcnetwork/c/watch.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "watch.h"
#include <string.h>

void outsourcing_task_init(struct lnwatch_task* task, const struct sha256_double* commitid)
{
Expand Down
5 changes: 5 additions & 0 deletions ccan/ccan/opt/helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
#include "private.h"
#include <float.h>

#ifdef _MSC_VER
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#endif

/* Upper bound to sprintf this simple type? Each 3 bits < 1 digit. */
#define CHAR_SIZE(type) (((sizeof(type)*CHAR_BIT + 2) / 3) + 1)

Expand Down
6 changes: 4 additions & 2 deletions libwally-core/src/cpufeatures/cpu-features.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,14 +546,16 @@ get_elf_hwcap_from_proc_self_auxv(void) {
struct { uint32_t tag; uint32_t value; } entry;
uint32_t result = 0;
const char filepath[] = "/proc/self/auxv";
int fd = TEMP_FAILURE_RETRY(open(filepath, O_RDONLY));
/* int fd = TEMP_FAILURE_RETRY(open(filepath, O_RDONLY)); */
int fd = -1;
if (fd < 0) {
return 0;
}


for (;;) {
int ret = TEMP_FAILURE_RETRY(read(fd, (char*)&entry, sizeof entry));
/* int ret = TEMP_FAILURE_RETRY(read(fd, (char*)&entry, sizeof entry)); */
int ret = -1;
if (ret < 0) {
break;
}
Expand Down
4 changes: 4 additions & 0 deletions libwally-core/src/hmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ void hmac_sha256_internal(struct sha256 *sha,
const unsigned char *key, size_t key_len,
const unsigned char *msg, size_t msg_len);

void hmac_sha256(struct sha256 *sha,
const unsigned char *key, size_t key_len,
const unsigned char *msg, size_t msg_len);

/**
* hmac_sha512 - Compute an HMAC using SHA-512
*
Expand Down
1 change: 0 additions & 1 deletion libwally-core/src/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const secp256k1_context *secp_ctx(void);
#define PUBKEY_COMPRESSED SECP256K1_EC_COMPRESSED
#define PUBKEY_UNCOMPRESSED SECP256K1_EC_UNCOMPRESSED


inline static void clear(void *p, size_t len)
{
clear_n(1, p, len);
Expand Down
2 changes: 1 addition & 1 deletion lightningcore/commit_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,4 @@ size_t find_htlc_output_from_commit_tx(const struct bitcoin_tx* commit_tx,

tal_free(tmpctx);
return ret;
}
}
2 changes: 1 addition & 1 deletion lightningcore/lnchannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ void lnchn_notify_tx_delivered(struct LNchannel *chn, const struct bitcoin_tx *t
enum outsourcing_deliver ret, const struct sha256_double *taskid);


#endif /* LIGHTNING_CORE_LNCHANNEL_H */
#endif /* LIGHTNING_CORE_LNCHANNEL_H */
2 changes: 1 addition & 1 deletion lightningcore/lnchannel_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,4 @@ int LNAPI_channelnotify_revo_commit(struct LNchannel *chn,
int LNAPI_channelnotify_commit_done(struct LNchannel *chn)
{
return lnchn_notify_commit_done(chn)? 0 : check_failure(chn);
}
}
2 changes: 1 addition & 1 deletion lightninglite/manager_dummy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,4 @@ namespace lnl_dummy {
{
return nullptr;
}
}
}

0 comments on commit 830f284

Please sign in to comment.