- if((str_len > 19) &&
- (str[4] == '-') &&
- (str[7] == '-') &&
- (str[10] == ' ') &&
- (str[13] == ':') &&
- (str[16] == ':') &&
- isdigit((int)str[0]) &&
- isdigit((int)str[1]) &&
- isdigit((int)str[2]) &&
- isdigit((int)str[3]))
- {
-
- /* If the saved message is empty, set it and continue. */
- if(buffer[0] == '\0')
- {
- strncpy(buffer, str, str_len + 2);
+ if ((str_len > 19) &&
+ (str[4] == '-') &&
+ (str[7] == '-') &&
+ (str[10] == ' ') &&
+ (str[13] == ':') &&
+ (str[16] == ':') &&
+ isdigit((int)str[0]) &&
+ isdigit((int)str[1]) &&
+ isdigit((int)str[2]) &&
+ isdigit((int)str[3])) {
+
+ /* If the saved message is empty, set it and continue */
+ if (buffer[0] == '\0') {
+ strncpy(buffer, str, OS_MAXSTR);