From: Tim Kientzle Date: Fri, 12 Jun 2009 05:19:15 +0000 (-0400) Subject: Since bsdtar already pays for stdio, just use fprintf() here instead of trying to... X-Git-Tag: v2.8.0~588 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3baab2cf7abe57f5b489ef99dab52608ae258d76;p=thirdparty%2Flibarchive.git Since bsdtar already pays for stdio, just use fprintf() here instead of trying to economize by using write(). SVN-Revision: 1161 --- diff --git a/tar/tree.c b/tar/tree.c index 663f25346..e06cb5300 100644 --- a/tar/tree.c +++ b/tar/tree.c @@ -312,10 +312,8 @@ tree_next(struct tree *t) /* If we're called again after a fatal error, that's an API * violation. Just crash now. */ if (t->visit_type == TREE_ERROR_FATAL) { - const char *msg = "Unable to continue traversing" - " directory heirarchy after a fatal error."; - size_t s = write(2, msg, strlen(msg)); - (void)s; /* UNUSED */ + fprintf(stderr, "Unable to continue traversing" + " directory heirarchy after a fatal error."); *(int *)0 = 1; /* Deliberate SEGV; NULL pointer dereference. */ exit(1); /* In case the SEGV didn't work. */ }