Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix return value of dlt_log_init function #711

Closed
wants to merge 0 commits into from
Closed

Conversation

lti9hc
Copy link
Collaborator

@lti9hc lti9hc commented Nov 25, 2024

dlt_log_init function should return with value

@minminlittleshrimp
Copy link
Collaborator

Please consider to rework, should change code snipe inside issue function, not the dlt_log_init itself

@@ -77,7 +77,7 @@ void dlt_log_set_level(int level)
}
}

void dlt_log_init(int mode)
DltReturnValue dlt_log_init(int mode)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dlt_log_init must not return anything since it is a void call.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @minminlittleshrimp ,
could you explain why that function must not return anything?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any impacts when we set return value for that function?

@minminlittleshrimp
Copy link
Collaborator

minminlittleshrimp commented Dec 30, 2024

Hello @Le-Tin
Suggested fix: using the inner-wrapped function

log_init_result = dlt_log_init_multiple_logfiles_support(daemon_local.flags.loggingMode, false, 0, 0);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants