Windows: Use secure ctime and strncpy in afs_ctime
[openafs.git] / src / util / afsutil.h
index 177a3f2..5b73ad4 100644 (file)
@@ -91,13 +91,13 @@ extern char *vctime(const time_t * atime);
 #else /* AFS_PTHREAD_ENV && !AFS_NT40_ENV */
 static_inline char *
 afs_ctime(const time_t *C, char *B, size_t S) {
-#if !defined(AFS_NT40_ENV) || (_MSC_VER < 1500)
+#if !defined(AFS_NT40_ENV) || (_MSC_VER < 1400)
     strncpy(B, ctime(C), (S-1));
     B[S-1] = '\0';
 #else
     char buf[32];
     if (ctime_s(buf, sizeof(buf), C) ||
-        strncpy_s(B, S, buf, _TRUNCATE)
+        strncpy_s(B, S, buf, _TRUNCATE))
          B[0] = '\0';
 #endif
     return B;