]> git.ozlabs.org Git - ccan/blobdiff - ccan/rfc822/_info
ccanlint: enhance and streamline "output" testing lines.
[ccan] / ccan / rfc822 / _info
index dac530cd84b4e369c55a54b8ed7437ced4f42931..5a0a9c6a6080c050c35095867019026d0ce02ce5 100644 (file)
@@ -25,9 +25,9 @@
  * it too).
  *
  * Example:
- *     // Given '' outputs 'body'
- *     // Given 'From' outputs ' <from@example.com>'
- *     // Given 'To' outputs ' <to@example.com>'
+ *     // Outputs "body\n"
+ *     // Given "From" outputs <from@example.com>
+ *     // Given "To" outputs <to@example.com>
  *     char buf[] = "From: <from@example.com>\n"
  *                  "To: <to@example.com>\n\n"
  *                   "body\n";
@@ -35,7 +35,7 @@
  *     struct bytestring out;
  *
  *     msg = rfc822_start(NULL, buf, sizeof(buf));
- *     if (!argv[1] || !argv[1][0])
+ *     if (!argv[1])
  *             out = rfc822_body(msg);
  *     else {
  *             struct rfc822_header *hdr;
@@ -65,6 +65,7 @@ int main(int argc, char *argv[])
                printf("ccan/list\n");
                printf("ccan/str\n");
                printf("ccan/bytestring\n");
+               printf("ccan/mem\n");
                return 0;
        }