[ccan] [PATCH] strgrp: Fix compile errors in example

Andrew Jeffery andrew at aj.id.au
Mon Sep 14 22:14:42 AEST 2015


Hi David,

On Mon, 2015-09-14 at 21:25 +1000, David Gibson wrote:
> Commit 63f13d6 "strgrp: Tidy up kerneldoc in _info" introduced some
> compile
> errors into the example in strgrp/_info.  This fixes them.

Ah damn :( Apologies for that!
 
I was hacking around with `make webpages` to check the rendering and
clearly forgot to run `make check`. I'll make sure to configure Travis
CI.

Separately, I had tried to post the initial patch to the mailing list
to get some feedback but `git send-email` was failing to send it, not
sure why. I figured that as the original patch only really appeared on
Rusty's radar that posting just the "documentation" fixup for review
might've lacked context, but clearly I should've done so (and clearly
it was more than "just" documentation).

Thanks for cleaning up after me :/

Andrew

> 
> Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
> ---
>  ccan/strgrp/_info | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> I've just committed this fix for errors in the strgrp _info file.
> 
> This one got caught by the Travis CI system, which I wired ccan up to
> a little while back - see
> https://travis-ci.org/rustyrussell/ccan/builds.
> 
> It seems to work pretty well, so I highly recommend it.  If you have
> a
> github tree, it's trivial to wire up (e.g. mine's at
> https://travis-ci.org/dgibson/ccan).
> 
> diff --git a/ccan/strgrp/_info b/ccan/strgrp/_info
> index 98f9bb2..e0b70b4 100644
> --- a/ccan/strgrp/_info
> +++ b/ccan/strgrp/_info
> @@ -56,7 +56,7 @@
>   * Author: Andrew Jeffery <andrew at aj.id.au>
>   *
>   * Example:
> - *     FILE *const f;
> + *     FILE *f;
>   *     char *buf;
>   *     struct strgrp *ctx;
>   *     struct strgrp_iter *iter;
> @@ -77,10 +77,10 @@
>   *
>   *     // Re-implement something similar to strgrp_print() via API
> as an
>   *     // example
> - *     *iter = strgrp_iter_new(ctx);
> + *     iter = strgrp_iter_new(ctx);
>   *     while(NULL != (grp = strgrp_iter_next(iter))) {
>   *         printf("%s\n", strgrp_grp_key(grp));
> - *         *grp_iter = strgrp_grp_iter_new(grp);
> + *         grp_iter = strgrp_grp_iter_new(grp);
>   *         while(NULL != (item = strgrp_grp_iter_next(grp_iter))) {
>   *              printf("\t%s\n", strgrp_item_key(item));
>   *         }



More information about the ccan mailing list