shithub: riscv

Download patch

ref: ff6a0f490a9f7b11ec7e370dfd0a923cd0318d40
parent: a74c7ca5ea3290dd55c6f2a03aa7c3bcd22d3f61
author: rodri <rgl@antares-labs.eu>
date: Mon May 13 09:37:22 EDT 2024

tmdate(2): fix two little typos in the examples

--- a/sys/man/2/tmdate
+++ b/sys/man/2/tmdate
@@ -226,7 +226,7 @@
 
 pst = "Tue Dec 10 12:36:00 PST 2019";
 est = "Tue Dec 10 15:36:00 EST 2019";
-f(tmparse(&a, Fmt, pst, nil, &e) == nil)
+if(tmparse(&a, Fmt, pst, nil, &e) == nil)
 	sysfatal("failed to parse: %r");
 if(*e != '\\0')
 	sysfatal("trailing junk %s", e);
@@ -266,7 +266,7 @@
 char *date = "Sun Nov 2 13:11:11 PST 2019";
 if(tmparse(&t, "W MMM D hh:mm:ss z YYYY, date, nil) == nil)
 	print("failed to parse");
-t.day++;
+t.mday++;
 tmnorm(&t);
 print("%τ", tmfmt(&t, nil)); /*  Mon Nov 3 13:11:11 PST 2019 */
 .EE