From: Marek VavruĊĦa Date: Wed, 18 Mar 2015 12:44:27 +0000 (+0100) Subject: modules/doc: fixed typos X-Git-Tag: v1.0.0-beta1~298 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4dce7a324c9f1efa3a82c9f81a2ea10e2b2d1996;p=thirdparty%2Fknot-resolver.git modules/doc: fixed typos --- diff --git a/modules/README.md b/modules/README.md index c3d790131..a7b756e78 100644 --- a/modules/README.md +++ b/modules/README.md @@ -255,7 +255,7 @@ static char* cached_size(struct kr_context *ctx, struct kr_module *module, const } /* For the sake of brevity... */ - asprintf(&result, "{ "cache_size": %d }\n", kr_cache_count(&txn)); + asprintf(&result, "{ \"size\": %d }\n", kr_cache_count(&txn)); kr_cache_txn_abort(&txn); return result; @@ -265,7 +265,7 @@ struct kr_prop *cached_props(void) { static struct kr_prop prop_list[] = { /* Callback, Name, Description */ - { &cache_size, "size", "Return number of cached records.", }, + { &cached_size, "size", "Return number of cached records.", }, { NULL, NULL, NULL } }; return prop_list; @@ -280,6 +280,7 @@ Once you load the module, you can call the module property from the interactive ```sh $ kresolved ... +[system] started in interactive mode, type 'help' > load cached > cached.cached_size { "cache_size": 53 } @@ -291,4 +292,4 @@ $ kresolved [processing]: https://gitlab.labs.nic.cz/labs/knot/tree/master/src/libknot/processing [golang-syntax]: http://blog.golang.org/gos-declaration-syntax [cgo]: http://golang.org/cmd/cgo/ -[gccgo]: https://golang.org/doc/install/gccgo \ No newline at end of file +[gccgo]: https://golang.org/doc/install/gccgo diff --git a/modules/gostats/gostats.go b/modules/gostats/gostats.go index c5b04597e..6a4d89b21 100644 --- a/modules/gostats/gostats.go +++ b/modules/gostats/gostats.go @@ -31,7 +31,7 @@ func Deinit(module *C.struct_kr_module) C.int { } func Begin(ctx *C.knot_layer_t, param unsafe.Pointer) C.int { - ctx->data = param + ctx.data = param return 0 } @@ -43,4 +43,4 @@ func Finish(ctx *C.knot_layer_t) C.int { func Layer() *C.knot_layer_api_t { return C._layer() -} \ No newline at end of file +}