]> git.sur5r.net Git - openocd/blobdiff - src/main.c
Avoid dereferencing NULL pointer.
[openocd] / src / main.c
index a71977daf9041e896599c5a1050c2525328414f3..83e60d8e0e252996094e9ccc61fb4f539abe954e 100644 (file)
  *   GNU General Public License for more details.                          *
  *                                                                         *
  *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
  ***************************************************************************/
 
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -35,5 +32,9 @@
 
 int main(int argc, char *argv[])
 {
+       /* disable buffering otherwise piping to logs causes problems work */
+       setvbuf(stdout, NULL, _IONBF, 0);
+       setvbuf(stderr, NULL, _IONBF, 0);
+
        return openocd_main(argc, argv);
 }