* Re: [PATCH lttng-tools] Fix: getenv can return null
[not found] <20190430230924.23711-1-jonathan.rajotte-julien@efficios.com>
@ 2019-05-01 14:37 ` Jérémie Galarneau
0 siblings, 0 replies; 2+ messages in thread
From: Jérémie Galarneau @ 2019-05-01 14:37 UTC (permalink / raw)
To: Jonathan Rajotte; +Cc: lttng-dev, jgalar
Merged in master and stable-2.11.
Thanks!
Jérémie
On Tue, Apr 30, 2019 at 07:09:24PM -0400, Jonathan Rajotte wrote:
> On system with LANG not defined getenv will return null.
>
> An example of such system is the lava runner used by ci.lttng.org.
>
> https://ci.lttng.org/view/System%20Tests/
>
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
> ---
> src/common/time.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/common/time.c b/src/common/time.c
> index 5519e3ab4..a01c16df5 100644
> --- a/src/common/time.c
> +++ b/src/common/time.c
> @@ -76,7 +76,7 @@ void __attribute__((constructor)) init_locale_utf8_support(void)
>
> if (program_locale && strstr(program_locale, "utf8")) {
> utf8_output_supported = true;
> - } else if (strstr(lang, "utf8")) {
> + } else if (lang && strstr(lang, "utf8")) {
> utf8_output_supported = true;
> }
> }
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH lttng-tools] Fix: getenv can return null
@ 2019-04-30 23:09 Jonathan Rajotte
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Rajotte @ 2019-04-30 23:09 UTC (permalink / raw)
To: lttng-dev; +Cc: jgalar
On system with LANG not defined getenv will return null.
An example of such system is the lava runner used by ci.lttng.org.
https://ci.lttng.org/view/System%20Tests/
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
---
src/common/time.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/common/time.c b/src/common/time.c
index 5519e3ab4..a01c16df5 100644
--- a/src/common/time.c
+++ b/src/common/time.c
@@ -76,7 +76,7 @@ void __attribute__((constructor)) init_locale_utf8_support(void)
if (program_locale && strstr(program_locale, "utf8")) {
utf8_output_supported = true;
- } else if (strstr(lang, "utf8")) {
+ } else if (lang && strstr(lang, "utf8")) {
utf8_output_supported = true;
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-01 14:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20190430230924.23711-1-jonathan.rajotte-julien@efficios.com>
2019-05-01 14:37 ` [PATCH lttng-tools] Fix: getenv can return null Jérémie Galarneau
2019-04-30 23:09 Jonathan Rajotte
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).