mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
don't spam to stderr in API functions
This commit is contained in:
parent
0075649f13
commit
4e6fb67e9f
1 changed files with 1 additions and 5 deletions
|
|
@ -113,10 +113,8 @@ char *pa_get_host_name(char *s, size_t l) {
|
||||||
pa_assert(s);
|
pa_assert(s);
|
||||||
pa_assert(l > 0);
|
pa_assert(l > 0);
|
||||||
|
|
||||||
if (gethostname(s, l) < 0) {
|
if (gethostname(s, l) < 0)
|
||||||
pa_log("gethostname(): %s", pa_cstrerror(errno));
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
s[l-1] = 0;
|
s[l-1] = 0;
|
||||||
return s;
|
return s;
|
||||||
|
|
@ -142,12 +140,10 @@ char *pa_get_home_dir(char *s, size_t l) {
|
||||||
#ifdef HAVE_PWD_H
|
#ifdef HAVE_PWD_H
|
||||||
#ifdef HAVE_GETPWUID_R
|
#ifdef HAVE_GETPWUID_R
|
||||||
if (getpwuid_r(getuid(), &pw, buf, sizeof(buf), &r) != 0 || !r) {
|
if (getpwuid_r(getuid(), &pw, buf, sizeof(buf), &r) != 0 || !r) {
|
||||||
pa_log("getpwuid_r() failed");
|
|
||||||
#else
|
#else
|
||||||
/* XXX Not thread-safe, but needed on OSes (e.g. FreeBSD 4.X)
|
/* XXX Not thread-safe, but needed on OSes (e.g. FreeBSD 4.X)
|
||||||
* that do not support getpwuid_r. */
|
* that do not support getpwuid_r. */
|
||||||
if ((r = getpwuid(getuid())) == NULL) {
|
if ((r = getpwuid(getuid())) == NULL) {
|
||||||
pa_log("getpwuid_r() failed");
|
|
||||||
#endif
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue