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

Possible fix for tmpnam. #308

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion addons/Socket/source/LocalNameServers.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ void LocalNameServers_findIps(LocalNameServers *self)

void LocalNameServers_findIps(LocalNameServers *self)
{
char *path = tmpnam(NULL);
char *path = NULL;
Copy link

Choose a reason for hiding this comment

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

Looks like there's a minor whitespace issue here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Funny, the whitespace doesn't show up incorrectly on my computer. Probably some issue with my vim configuration.

mkstemp(path);
Copy link

Choose a reason for hiding this comment

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

mkstemp returns a file descriptor, do we need to capture it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@acook: I am unsure. I thought the old code captured it, so I preserved it. I may, however, be mistaken.

char *command = io_malloc(1024);
char *answerBuffer = io_calloc(1, 1024);
char *answer = answerBuffer;
Expand Down