delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/12/11/02:42:33

Date: Mon, 11 Dec 2000 09:40:56 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Juan Manuel Guerrero <ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De>
cc: djgpp-workers AT delorie DOT com
Subject: Re: A bugfix for djtar
In-Reply-To: <116197B1031@HRZ1.hrz.tu-darmstadt.de>
Message-ID: <Pine.SUN.3.91.1001211093659.11147J-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 11 Dec 2000, Juan Manuel Guerrero wrote:

> Unfortunately, if the **unziped** file size exceeds 32kB
> djtar will crash with the following traceback:
> 
> Abort!
> Exiting due to signal SIGABRT
> Raised at eip=0000f1b6

Thanks for hunting this down.

>           /* Probably corrupted archive.  Bail out.  */
> !         if (error_message_not_printed)
> !         {
> !           error_message_not_printed = 0; /* Yes, we have printed it. */
> !           fprintf(log_out, "--- !!Directory checksum error!! ---\n");
> !         }

Please change the new variable's name to error_message_printed,
initialize it to zero, and set to 1 after the message is printed.
Double negation such as this:

        error_message_not_printed = 0; /* Yes, we have printed it. */

confuses programmers and is a source of many programmatic errors 
(althought your code is correct).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019