- strncpy(custom_format, optarg, FORMAT_STRING_LEN - 1);
- custom_format[FORMAT_STRING_LEN] = 0;
+ strncpy(custom_format, optarg, FORMAT_STRING_LEN);
+ custom_format[FORMAT_STRING_LEN - 1] = 0;
- parsed_custom_format = (char *)malloc(FORMAT_STRING_LEN * sizeof(char*));
- custom_format_fields = (enum field_types *)malloc(FORMAT_STRING_MAX_FIELDS * sizeof(enum field_types *));
+ parsed_custom_format = (char *)malloc(FORMAT_STRING_LEN);
+ custom_format_fields = (enum field_types *)malloc(FORMAT_STRING_MAX_FIELDS * sizeof(enum field_types));
getname(line, &name, &email);
add_email_count += add_email_add_item(quiet,
name, email);
getname(line, &name, &email);
add_email_count += add_email_add_item(quiet,
name, email);