aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-08-24 02:17:12 +0200
committerMax Kellermann <max@duempel.org>2011-08-24 02:19:40 +0200
commit0575a6d652d7db9b8783db59963f9b612dc7b282 (patch)
tree900a2fce2dd8a1eef897b986988beda2ce4498da /src
parent08b88714e0327a4a138597ba9d434abc0eb130c4 (diff)
downloadmpd-0575a6d652d7db9b8783db59963f9b612dc7b282.tar.gz
mpd-0575a6d652d7db9b8783db59963f9b612dc7b282.tar.xz
mpd-0575a6d652d7db9b8783db59963f9b612dc7b282.zip
output/raop: use GLib byte order macros
Diffstat (limited to 'src')
-rw-r--r--src/output/raop_output_plugin.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/output/raop_output_plugin.c b/src/output/raop_output_plugin.c
index dd35ce8e9..dba89daef 100644
--- a/src/output/raop_output_plugin.c
+++ b/src/output/raop_output_plugin.c
@@ -378,12 +378,10 @@ get_tcp_connect_by_host(int sd, const char *host, short destport,
* Calculate the current NTP time, store it in the buffer.
*/
static void
-fill_int(unsigned char *buffer, unsigned int rtp_time)
+fill_int(unsigned char *buffer, uint32_t value)
{
- int iter;
- for (iter = 0; iter < 4; iter++) {
- buffer[iter] = (rtp_time >> ((3 - iter) * 8)) & 0xff;
- }
+ uint32_t be = GINT32_TO_BE(value);
+ memcpy(buffer, &be, sizeof(be));
}
/*