summaryrefslogtreecommitdiff
path: root/man/sd_bus_new.xml
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-07-27 08:24:45 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-08-02 15:45:24 +0200
commit787f78b6a106d34bbf52eabb02995733ea6a7d4d (patch)
treeb23f4929a95d2c641526084e9330c933348ac2af /man/sd_bus_new.xml
parent2c47fff6d2d9750ddf9e97fc45714aa8984b5eb6 (diff)
downloadsystemd-787f78b6a106d34bbf52eabb02995733ea6a7d4d.tar.gz
man: move more examples to stand-alone files and use 2-space indentation consistenty
Moving them out makes it easier to run them through a compiler, use automatic indentation, and opens the possibility to provide a download link in the future. I verified that all examples compile cleanly. (2-space indentation is used because the examples are already significantly indented in the man page, and we need to keep them narrow so that they display well on standard terminals.)
Diffstat (limited to 'man/sd_bus_new.xml')
-rw-r--r--man/sd_bus_new.xml14
1 files changed, 7 insertions, 7 deletions
diff --git a/man/sd_bus_new.xml b/man/sd_bus_new.xml
index 5180ae7815..59117676fd 100644
--- a/man/sd_bus_new.xml
+++ b/man/sd_bus_new.xml
@@ -96,13 +96,13 @@
block is left:</para>
<programlisting>{
- __attribute__((cleanup(sd_bus_unrefp)) sd_bus *bus = NULL;
- int r;
- …
- r = sd_bus_default(&amp;bus);
- if (r &lt; 0)
- fprintf(stderr, "Failed to allocate bus: %s\n", strerror(-r));
- …
+ __attribute__((cleanup(sd_bus_unrefp)) sd_bus *bus = NULL;
+ int r;
+ …
+ r = sd_bus_default(&amp;bus);
+ if (r &lt; 0)
+ fprintf(stderr, "Failed to allocate bus: %s\n", strerror(-r));
+ …
}</programlisting>
<para><function>sd_bus_ref()</function> and <function>sd_bus_unref()</function>