From 4413b89d7a45587b545a31463ad2196767f45563 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 25 May 2006 17:16:55 +0000 Subject: * split pa_cstrerror() into its own file polypcore/core-error.[ch] * fix building of padsp * remove a warning when compiling padsp.c git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@972 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/pacmd.c | 14 +++++++------- src/utils/padsp.c | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/utils') diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c index 351d79da..ad50c77c 100644 --- a/src/utils/pacmd.c +++ b/src/utils/pacmd.c @@ -54,7 +54,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { } if ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) { - pa_log(__FILE__": socket(PF_UNIX, SOCK_STREAM, 0): %s", pa_cstrerror(errno)); + pa_log(__FILE__": socket(PF_UNIX, SOCK_STREAM, 0): %s", strerror(errno)); goto fail; } @@ -66,7 +66,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { int r; if ((r = connect(fd, (struct sockaddr*) &sa, sizeof(sa))) < 0 && (errno != ECONNREFUSED && errno != ENOENT)) { - pa_log(__FILE__": connect(): %s", pa_cstrerror(errno)); + pa_log(__FILE__": connect(): %s", strerror(errno)); goto fail; } @@ -97,7 +97,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { for (;;) { if (select(FD_SETSIZE, &ifds, &ofds, NULL, NULL) < 0) { - pa_log(__FILE__": select(): %s", pa_cstrerror(errno)); + pa_log(__FILE__": select(): %s", strerror(errno)); goto fail; } @@ -109,7 +109,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { if (r == 0) break; - pa_log(__FILE__": read(): %s", pa_cstrerror(errno)); + pa_log(__FILE__": read(): %s", strerror(errno)); goto fail; } @@ -125,7 +125,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { if (r == 0) break; - pa_log(__FILE__": read(): %s", pa_cstrerror(errno)); + pa_log(__FILE__": read(): %s", strerror(errno)); goto fail; } @@ -138,7 +138,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { assert(obuf_length); if ((r = write(1, obuf + obuf_index, obuf_length)) < 0) { - pa_log(__FILE__": write(): %s", pa_cstrerror(errno)); + pa_log(__FILE__": write(): %s", strerror(errno)); goto fail; } @@ -152,7 +152,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { assert(ibuf_length); if ((r = write(fd, ibuf + ibuf_index, ibuf_length)) < 0) { - pa_log(__FILE__": write(): %s", pa_cstrerror(errno)); + pa_log(__FILE__": write(): %s", strerror(errno)); goto fail; } diff --git a/src/utils/padsp.c b/src/utils/padsp.c index 5987ec5f..c1cc9c92 100644 --- a/src/utils/padsp.c +++ b/src/utils/padsp.c @@ -361,7 +361,7 @@ static void reset_params(fd_info *i) { i->n_fragments = 0; } -static char *client_name(char *buf, size_t n) { +static const char *client_name(char *buf, size_t n) { char p[PATH_MAX]; const char *e; @@ -376,7 +376,7 @@ static char *client_name(char *buf, size_t n) { return buf; } -static char *stream_name(void) { +static const char *stream_name(void) { const char *e; if ((e = getenv("PADSP_STREAM_NAME"))) -- cgit