* Hook output functions (like printf(3)) with LD_PRELOAD to color stderr (or
* other file descriptors).
*
- * Copyright (C) 2013 Simon Ruderich
+ * Copyright (C) 2013-2014 Simon Ruderich
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
int saved_errno = errno;
- if (unlikely(!pre_string || !post_string)) {
+ if (unlikely(!pre_string)) {
init_pre_post_string();
}
int saved_errno = errno;
- if (unlikely(!pre_string || !post_string)) {
+ if (unlikely(!pre_string)) {
init_pre_post_string();
}
if (error_one_per_line
&& filename != NULL && linenum != 0
&& filename == last_filename && linenum == last_linenum) {
- return;
+ goto out;
}
last_filename = filename;
last_linenum = linenum;
fprintf(stderr, "\n");
+out:
if (status != 0) {
exit(status);
}