Skip to content

Commit

Permalink
chore(agent): simplify how we look for major version
Browse files Browse the repository at this point in the history
  • Loading branch information
hahuja2 committed Apr 8, 2024
1 parent e94e897 commit 4b61257
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions agent/fw_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,9 @@ void nr_fw_support_add_package_supportability_metric(
*/
for (int i = 0; package_version[i] && i < 4; i++) {
if ('.' == package_version[i]) {
strncpy(major_version, package_version, i);
major_version[i] = '\0';
break;
}
}

if ('\0' == major_version[0] && '\0' != package_version[0]) {
strncpy(major_version, package_version, 1);
major_version[1] = '\0';
major_version[i] = package_version[i];
}

if (NR_FW_UNSET == NRINI(force_framework)) {
Expand Down

0 comments on commit 4b61257

Please sign in to comment.