sdbus++: generate valid code 0 return methods

A method with 0 returns could result in incorrectly generated
code due to a mistake that looked at the param-count instead
of the return-count.

Fixes openbmc/sdbusplus#3.

Change-Id: Ifbbd89ab8c8dcfee60c18446f30446b052992f3f
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/tools/sdbusplus/templates/method.mako.prototype.hpp b/tools/sdbusplus/templates/method.mako.prototype.hpp
index 7d295eb..1d3cbfb 100644
--- a/tools/sdbusplus/templates/method.mako.prototype.hpp
+++ b/tools/sdbusplus/templates/method.mako.prototype.hpp
@@ -181,7 +181,7 @@
                 ${ parameters_types_as_list() }>());
     % endif
 static const auto _return_${ method.CamelCase } =
-    % if len(method.parameters) == 0:
+    % if len(method.returns) == 0:
         utility::tuple_to_array(std::make_tuple('\0'));
     % else:
         utility::tuple_to_array(message::types::type_id<