[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 04/06: fix temporary variable return in use
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 04/06: fix temporary variable return in userconf_path() |
Date: |
Tue, 16 Aug 2016 16:24:32 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit 6dade06d39719b0a6d611e02b144998312c6c6da
Author: Josh Blum <address@hidden>
Date: Sat Aug 6 21:32:33 2016 -0700
fix temporary variable return in userconf_path()
This fix provides an internal userconf_path() implementation
that provides the path as a string. The path is actually stored
in the real userconf_path() within a static variable making it
safe to return a char * pointer from this static string.
---
gnuradio-runtime/lib/sys_paths.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gnuradio-runtime/lib/sys_paths.cc
b/gnuradio-runtime/lib/sys_paths.cc
index 3bf6697..f63d773 100644
--- a/gnuradio-runtime/lib/sys_paths.cc
+++ b/gnuradio-runtime/lib/sys_paths.cc
@@ -64,10 +64,16 @@ namespace gr {
return tmp_path();
}
- const char *userconf_path()
+ std::string __userconf_path()
{
boost::filesystem::path p(appdata_path());
p = p / ".gnuradio";
+ return p.string();
+ }
+
+ const char *userconf_path()
+ {
+ static std::string p(__userconf_path());
return p.c_str();
}
- [Commit-gnuradio] [gnuradio] branch maint updated (59daaff -> cd40a9b), git, 2016/08/16
- [Commit-gnuradio] [gnuradio] 02/06: fix copypasta typo in pfb_clock_sync_fff_impl.cc, git, 2016/08/16
- [Commit-gnuradio] [gnuradio] 06/06: Merge remote-tracking branch 'josh/3710_win_fixes' into maint, git, 2016/08/16
- [Commit-gnuradio] [gnuradio] 04/06: fix temporary variable return in userconf_path(),
git <=
- [Commit-gnuradio] [gnuradio] 05/06: move fec polar decoder D_LLR_FACTOR into cpp, git, 2016/08/16
- [Commit-gnuradio] [gnuradio] 01/06: add srand/drand48() to msvc/config.h, git, 2016/08/16
- [Commit-gnuradio] [gnuradio] 03/06: add io.h include for portaudio source/sink, git, 2016/08/16