Tcl Source Code

Ticket Change Details
Login
Overview

Artifact ID: 41c2b7acc0683277b244aee5d8a0184b2e484660
Ticket: e832d2b08fc9e1d1ec9c354806fcdd7e89de6c39
unnecessary code in Tcl_SetMaxBlockTime
User & Date: anonymous 2013-10-30 13:06:13
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    In generic/tclNotify.c, in the function Tcl_SetMaxBlockTime, checking for tsdPtr->blockTimeSet in the second if-clause is unnecessary. The current code looks as follows:
    
    if (!tsdPtr->blockTimeSet || ...) {
        ...
        tsdPtr->blockTimeSet = 1;
    }
    
    if (!tsdPtr->inTraversal) {
        if (tsdPtr->blockTimeSet) {
            Tcl_SetTimer(&tsdPtr->blockTime);
        } else {
            Tcl_SetTimer(NULL);
        }
    }
    
    Either tsdPtr->blockTimeSet is already 1 when we enter this function, or otherwise the first if-clause will set it to 1. Therefore, the second if-clause can simply read
    
    if (!tsdPtr->inTraversal) {
        Tcl_SetTimer(&tsdPtr->blockTime);
    }
    
  5. foundin changed to: "8.6.0"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "500c9a7a4e11b3ea0441850610e04006941c0cf3"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "01. Notifier"
  15. title changed to: "unnecessary code in Tcl_SetMacBlockTime"
  16. type changed to: "Bug"