]> git.ozlabs.org Git - ccan/blobdiff - ccan/typesafe_cb/_info
cast, str, take, tal/grabfile, tal/str, typesafe_cb: use argc
[ccan] / ccan / typesafe_cb / _info
index 165852a3be2a1a4dd7c884dfbe48084991292ae1..b4f379dd48b020c29bf8f27c8da88a37831e619a 100644 (file)
  *     // Silly game to find the longest chain of values.
  *     int main(int argc, char *argv[])
  *     {
- *             int i, run = 1, num = argv[1] ? atoi(argv[1]) : 0;
+ *             int i, run = 1, num = argc > 1 ? atoi(argv[1]) : 0;
  *     
  *             for (i = 1; i < 1024;) {
  *                     // Since run is an int, compiler checks "add" does too.