Sebastian Freundt avatar Sebastian Freundt committed e93fc85

minor, go straight to time massaging in massage_strpdt() when no strpd_s field is set

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>;

Comments (0)

Files changed (1)

 /* the reason we do this separately is that we don't want to bother
  * the pieces of code that use the guesser for different reasons */
 	if (UNLIKELY(d.sd.y == 0U)) {
+		static const struct strpd_s d0 = {};
 		struct tm now = now_tm();
 
+		if (UNLIKELY(memcmp(&d.sd, &d0, sizeof(d0)) == 0U)) {
+			goto msgg_time;
+		}
+
 		d.sd.y = now.tm_year;
 		if (LIKELY(d.sd.m)) {
 			goto out;
 		}
 		d.sd.d = now.tm_mday;
 
+	msgg_time:
 		/* same for time values, but obtain those through now_tv() */
 		if (UNLIKELY(!d.st.flags.h_set)) {
 			struct timeval tv = now_tv();
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.