comparison src/sound.c @ 40745:1622bfdfe454

(sound_perror): Save errno from being clobbered.
author Andreas Schwab <schwab@suse.de>
date Mon, 05 Nov 2001 14:09:18 +0000
parents f7b039994118
children c07ef1efb323
comparison
equal deleted inserted replaced
40744:bf4cd0ec3cfb 40745:1622bfdfe454
260 260
261 static void 261 static void
262 sound_perror (msg) 262 sound_perror (msg)
263 char *msg; 263 char *msg;
264 { 264 {
265 int saved_errno = errno;
266
265 turn_on_atimers (1); 267 turn_on_atimers (1);
266 #ifdef SIGIO 268 #ifdef SIGIO
267 sigunblock (sigmask (SIGIO)); 269 sigunblock (sigmask (SIGIO));
268 #endif 270 #endif
269 if (errno != 0) 271 if (saved_errno != 0)
270 error ("%s: %s", msg, strerror (errno)); 272 error ("%s: %s", msg, strerror (saved_errno));
271 else 273 else
272 error ("%s", msg); 274 error ("%s", msg);
273 } 275 }
274 276
275 277