Skip to content

Commit

Permalink
Revert "Copy log file name instead of setting pointer (fr this time)"
Browse files Browse the repository at this point in the history
This reverts commit 23c878f.
  • Loading branch information
IAmMoltony committed Apr 14, 2024
1 parent 23c878f commit 484b5b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MtnLog is a really simple logging library. Originally created for [ds-craft](htt

## Notice

This library is now in *maintenance mode*. It won't be actively updated, but
This library is now in *maintenance mode*. It won't actively receive new functionality, but
it will still have bug fixes, accept pull requests, review issues, add support for
more compilers and platforms and documentation updates.

Expand Down
10 changes: 1 addition & 9 deletions source/mtnlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,7 @@ static char *_getTimeString(void)
void mtnlogInit(const MtnLogLevel level, const char *logFileName)
{
mtnlogSetLevel(level); /* set log level */

/* set log file name */
_logFileName = (char *)malloc(sizeof(char) * strlen(logFileName));
if (!_logFileName)
{
perror("Failed to allocate log file name buffer");
return;
}
strcpy(_logFileName, logFileName);
_logFileName = (char *)logFileName; /* set log file name */

if (_outFile)
{
Expand Down

0 comments on commit 484b5b5

Please sign in to comment.