diff options
Diffstat (limited to 'libbbot/manifest.cxx')
-rw-r--r-- | libbbot/manifest.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libbbot/manifest.cxx b/libbbot/manifest.cxx index dae6e3e..8a2ebaa 100644 --- a/libbbot/manifest.cxx +++ b/libbbot/manifest.cxx @@ -517,7 +517,7 @@ namespace bbot } else if (n == "target") { - if (target) + if (!target.empty ()) bad_name ("task target redefinition"); try @@ -566,6 +566,9 @@ namespace bbot if (machine.empty ()) bad_value ("no task machine specified"); + + if (target.empty ()) + bad_value ("no task target specified"); } void task_manifest:: @@ -583,9 +586,7 @@ namespace bbot s.next ("trust", v); s.next ("machine", machine); - - if (target) - s.next ("target", target->string ()); + s.next ("target", target.string ()); // Serialize an optional value of the strings type as a space-separated // string list. |