Before the following change
f947d0a Breaks configfiles! Major refactoring of i3status, see below
The die(fmt, ...) function was outputting the reason to the status bar
in addition to stderr. For this reason, it was meaningful to create a
temporary string according to the format string and then passing it
around to the different functions.
Nowadays, we only display the error message to stderr so calling
fprintf(stderr, ...) is much simpler.
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
*
*/
void die(const char *fmt, ...) {
- char buffer[512];
va_list ap;
va_start(ap, fmt);
- (void)vsnprintf(buffer, sizeof(buffer), fmt, ap);
+ (void)vfprintf(stderr, fmt, ap);
va_end(ap);
- fprintf(stderr, "%s", buffer);
exit(EXIT_FAILURE);
}