[systemd-commits] 2 commits - Makefile.am src/libsystemd-bus

Lennart Poettering lennart at kemper.freedesktop.org
Thu Nov 7 17:26:51 CET 2013


 Makefile.am                      |   13 ++++++++++++-
 src/libsystemd-bus/bus-message.c |    6 ++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit a27e222b58824c08fa0da18106cf28a02b6c5e23
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Nov 7 17:26:01 2013 +0100

    build-sys: add a make target to look for undocumented symbols
    
    With super-pretty output!

diff --git a/Makefile.am b/Makefile.am
index 5c3cbc1..86baae0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4572,4 +4572,15 @@ install-tree: all
 # Let's run all tests of the test suite, but under valgrind. Let's
 # exclude the one perl script we have in there
 valgrind-tests: $(TESTS)
-	for f in $(TESTS) ; do [ "$$f" == "$${f/.pl/}" ] && libtool --mode=execute valgrind --leak-check=full --error-exitcode=55 $(builddir)/$$f ; done
+	for f in $(TESTS) ; do \
+		[ "$$f" == "$${f/.pl/}" ] && libtool --mode=execute valgrind --leak-check=full --error-exitcode=55 $(builddir)/$$f ; \
+	done
+
+check-api-docs: $(lib_LTLIBRARIES)
+	for symbol in `for f in $(lib_LTLIBRARIES) ; do nm -g --defined-only $(builddir)/.libs/"$${f/.la/.so}" 2>&1 /dev/null | grep " T " | cut -d" " -f3 ; done` ; do \
+		if test -f $(builddir)/man/$$symbol.html ; then \
+			echo "  Symbol $$symbol() is documented." ; \
+		else \
+			echo "‣ Symbol $$symbol() lacks documentation." ; \
+		fi ; \
+	 done

commit b3273dafc730e6973045f94a849553a9b5280d2d
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Nov 7 17:11:25 2013 +0100

    bus: also check for NULL when appending trivial types

diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index 4b53a6c..3f9baca 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -1379,6 +1379,7 @@ int message_append_basic(sd_bus_message *m, char type, const void *p, const void
                 break;
 
         case SD_BUS_TYPE_BOOLEAN:
+
                 if (!p) {
                         r = -EINVAL;
                         goto fail;
@@ -1434,6 +1435,11 @@ int message_append_basic(sd_bus_message *m, char type, const void *p, const void
         }
 
         default:
+                if (!p) {
+                        r = -EINVAL;
+                        goto fail;
+                }
+
                 align = bus_type_get_alignment(type);
                 sz = bus_type_get_size(type);
                 break;



More information about the systemd-commits mailing list