output/raop: use GLib byte order macros

This commit is contained in:
Max Kellermann 2011-08-24 02:17:12 +02:00
parent 08b88714e0
commit 0575a6d652

View File

@ -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. * Calculate the current NTP time, store it in the buffer.
*/ */
static void static void
fill_int(unsigned char *buffer, unsigned int rtp_time) fill_int(unsigned char *buffer, uint32_t value)
{ {
int iter; uint32_t be = GINT32_TO_BE(value);
for (iter = 0; iter < 4; iter++) { memcpy(buffer, &be, sizeof(be));
buffer[iter] = (rtp_time >> ((3 - iter) * 8)) & 0xff;
}
} }
/* /*