From: Lennart Poettering Date: Wed, 3 Sep 2008 00:59:49 +0000 (+0200) Subject: Save a byte of memory X-Git-Tag: v1.0.18rc3~9 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=060e34d669ecfed6bc45b6012f824d99a8e316ac;p=alsa-plugins.git Save a byte of memory Since we only need a single char, we should allocate only a single char, instead of a string of two bytes. Woah! We're saving memory, baby! --- diff --git a/pulse/pulse.c b/pulse/pulse.c index f91d0e7..7bf0c7a 100644 --- a/pulse/pulse.c +++ b/pulse/pulse.c @@ -272,9 +272,10 @@ int pulse_connect(snd_pulse_t * p, const char *server) void pulse_poll_activate(snd_pulse_t * p) { + static const char x = 'x'; assert(p); - write(p->thread_fd, "a", 1); + write(p->thread_fd, &x, 1); } void pulse_poll_deactivate(snd_pulse_t * p)