Explorar el Código

Print Unknown Time if the time is unknown of an event.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1366 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake hace 19 años
padre
commit
0fd619a44f
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      test/subscription.c

+ 3 - 0
test/subscription.c

@@ -243,6 +243,9 @@ static char time_buf[1024];
 char *ais_time_str(SaTimeT time)
 char *ais_time_str(SaTimeT time)
 {
 {
 	time_t t;
 	time_t t;
+	if (time == SA_TIME_UNKNOWN) {
+		return "Unknown Time";
+	}
 	t = time / 1000000000ULL;
 	t = time / 1000000000ULL;
 	strcpy(time_buf, ctime(&t));
 	strcpy(time_buf, ctime(&t));
 	return time_buf;
 	return time_buf;