- 17 Dec, 2018 1 commit
-
-
Rusty Russell authored
take() applies to the literal pointer value, so tal_free() means it may randomly apply to a future allocation. Similarly, tal_resize() should preserve it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 12 Nov, 2018 1 commit
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 05 Nov, 2018 1 commit
-
-
Dmitry Petukhov authored
Hello. I've decided to take a look at c-lighting code, because we might consider using it in the future. I found a small problem in ccan/take/take.c that only concerns code that runs with CCAN_TAKE_DEBUG set (DEVELOPER=1 for c-lighting). It is a small issue, but I decided to notify you as the author of the code, anyway. the issue is: in take_() function, potential failure of realloc for labelarr is not handled. I attached a diff with a fix. I thought that making a pull request for c-lighting would not be right, as ccan is a separate project, but I did not find a way to report this at http://git.ozlabs.org/, where ccan repo resides. Therefore I wrote to you directly. [ Minor whitespace changes --RR ]
-
- 02 Nov, 2018 2 commits
-
-
Rusty Russell authored
If we have plugins, and those can register args, we have a problem finding the plugin dir! So, do a best-effort incomplete parse. Note that this can screw up in theory if we have "--unknown --foo" since we don't know if unknown takes an argument (in which case, ignore --foo) or not. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 18 Oct, 2018 1 commit
-
-
Rusty Russell authored
It's used inside io_finish; setting to 0 allows that to know we hit EOF on a read. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 12 Oct, 2018 4 commits
-
-
Rusty Russell authored
Trying to debug what looked like an htable fail in my own code (but seems it's not), I added htable_check a-la list_check et al. This means we now depend on ccan/str (for stringify), which breaks the _info example which also defined streq, and played nasty with const pointers. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
We should use rbuf primitives not reach inside to membuf. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Clean up some whitespace while we're there too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 27 Sep, 2018 1 commit
-
-
Rusty Russell authored
And change semantics: a negative number means "up to this much padding". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 26 Sep, 2018 1 commit
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 17 Sep, 2018 2 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 23 Aug, 2018 1 commit
-
-
Rusty Russell authored
A destructor on NULL doesn't make sense, but notifiers (eg. new children) do. We fix up a mistake in run-notifier (comparing ctx with itself) and loose typing in tal.c's tal_add_notifier_ too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 10 Aug, 2018 1 commit
-
-
Kazuhiro Sera authored
-
- 27 Jul, 2018 5 commits
-
-
Rusty Russell authored
This is least-surprise, but also means callers can sometimes do faster string handling by avoiding strstr(). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
The current semantics of tal_count() / tal_bytelen() are to return 0 for anything not allocated using tal_arr*. This is because we tried to save a native-length word in the header, but produces an awkward API. (To make it worse, defining CCAN_TAL_DEBUG turns length to always on, and we enable that for c-lightning developer mode, which hides bugs!). However, for c-lightning, just over half of allocations want a length: these use 3 words each, so we're actually worse off overall. The answer is to always have a length field in the header. This also simplfies the tal code. samba-allocs stats before: Tal time: 1237102-1305755(1.251e+06+/-2.1e+04)ns Tal_free time: 1346871-1514514(1.37844e+06+/-5.2e+04)ns After: Tal time: 1115180-1180633(1.1351e+06+/-2.1e+04)ns Tal_free time: 1334381-1465933(1.39148e+06+/-4.7e+04)ns Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
In particular, tal/str now passes through the label from the caller, so (in case of CCAN_TAL_DEBUG) you can actually see the file and line where the caller was, not just inside ccan/str. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
There are a number of other utilities which use the tal_alloc_ and tal_dup_arr_ internal interfaces directly, because they want to set the label themselves. We're about to break them all by changing those internal interfaces, so give them a mid-level interface to use. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
I had a bug caused by using tal_len instead of tal_count: let's make it explicit. @jb55 commented "ha. I always forget which one does which... Ack" Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 04 Jul, 2018 1 commit
-
-
Rusty Russell authored
ccan/cppmagic FTW! The only issue is that we can't tell if there's padding or they've missed a member, so we add a padding bytes count, so they'll get an error if it (for example) the structure adds a new member later. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 18 Jun, 2018 1 commit
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 12 Jun, 2018 10 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Groundwork for adding tests dynamically. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Works well with --autotools-style. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
This is the only non-text field. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Eric Wong authored
I don't see likely/unlikely being used by ccan/timer or any of its dependencies right now. Running `tools/ccanlint/ccanlint ccan/timer' reveals no regressions Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
- 10 May, 2018 1 commit
-
-
Rusty Russell authored
It defines __BYTE_ORDER to __BYTE_ORDER__; gcc complains when we define it to something else. Let it be already defined, but check that the value is what we expect. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 09 May, 2018 2 commits
-
-
Rusty Russell authored
php5 was finally removed from ozlabs.org, but php7.2 seems to work fine. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 06 Apr, 2018 3 commits
-
-
Kamil authored
gcc6 introduceed a new warning switched with -Wmisleading-identation. This caused to generate a compilation warning for if statement misleadingly indented, which caused HAVE_ASPRINTF to be defined as 0. Adding newline after an if statement fixes the problem.
-
Rusty Russell authored
Exracted (and slightly modified) from a MacOS PR for lightning. Based-on-patch-by: https://github.com/conanocSigned-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
(Taken from PR for lightning) Patch-from: https://github.com/conanocSigned-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 05 Apr, 2018 1 commit
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-