Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      10 Benefits of Hiring a React.js Development Company (2025–2026 Edition)

      August 13, 2025

      From Line To Layout: How Past Experiences Shape Your Design Career

      August 13, 2025

      Hire React.js Developers in the US: How to Choose the Right Team for Your Needs

      August 13, 2025

      Google’s coding agent Jules gets critique functionality

      August 13, 2025

      The best smartphones without AI features in 2025: Expert tested and recommended

      August 13, 2025

      GPT-5 was supposed to simplify ChatGPT but now it has 4 new modes – here’s why

      August 13, 2025

      Gemini just got two of ChatGPT’s best features – and they’re free

      August 13, 2025

      I found the easiest way to send files between my Android phone and desktop – and it’s free

      August 13, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Laravel Boost is released

      August 13, 2025
      Recent

      Laravel Boost is released

      August 13, 2025

      Frontend Standards for Optimizely Configured Commerce: Clean & Scalable Web Best Practices

      August 13, 2025

      Live Agent Escalation in Copilot Studio Using D365 Omnichannel – Architecture and Use Case

      August 13, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      OpenAI’s Sam Altman: GPT-5 fails to meet AGI standards amid Microsoft’s fading partnership — “it’s still missing something”

      August 13, 2025
      Recent

      OpenAI’s Sam Altman: GPT-5 fails to meet AGI standards amid Microsoft’s fading partnership — “it’s still missing something”

      August 13, 2025

      You Think You Need a Monster PC to Run Local AI, Don’t You? — My Seven-Year-Old Mid-range Laptop Says Otherwise

      August 13, 2025

      8 Registry Tweaks that will Make File Explorer Faster and Easier to Use on Windows 11

      August 13, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»News & Updates»CodeSOD: Classic WTF: When it’s OK to GOTO

    CodeSOD: Classic WTF: When it’s OK to GOTO

    June 25, 2025

    Where did you GOTO on your vacation? Nowhere. GOTO is considered harmful. Original —Remy

    Everybody knows that you should never use “goto” statements. Well, except in one or two rare circumstances that you won’t come across anyway. But even when you do come across those situations, they’re usually “mirage cases” where there’s no need to “goto” anyway. Kinda like today’s example, written by Jonathan Rockway’s colleague. Of course, the irony here is that the author likely tried to use “continue” as his label, but was forced to abbreviate it to “cont” in order to skirt compiler “reserved words” errors.

    while( sysmgr->getProcessCount() != 0 )
    {
      // Yes, I realize "goto" statements are considered harmful,
      // but this is a case where it is OK to use them
      cont:
    
      //inactivation is not guaranteed and may take up to 3 calls
      sysmgr->CurrentProcess()->TryInactivate();
      
      if( sysmgr->CurrentProcess()->IsActive() )
      {
        Sleep(DEFAULT_TIMEOUT);
        goto cont;
      }
    
      /* ED: Snip */
    
      //disconnect child processes
      if( sysmgr->CurrentProcess()->HasChildProcesses() )
      {
        /* ED: Snip */
      }
    
      /* ED: Snip */
       
      if( sysmgr->CurrentProcess()->IsReusable() )
      {
        sysmgr->ReuseCurrentProcess();
        goto cont;
      }  
    
      sysmgr->CloseCurrentProcess();
    
    }
    [Advertisement]
    ProGet’s got you covered with security and access controls on your NuGet feeds. Learn more.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleRogue WordPress Plugin Unmasked: Stealthy Malware Skims Credit Cards & Steals Credentials
    Next Article CVE-2025-5585 – SiteOrigin Widgets Bundle Stored Cross-Site Scripting Vulnerability

    Related Posts

    News & Updates

    The best smartphones without AI features in 2025: Expert tested and recommended

    August 13, 2025
    News & Updates

    GPT-5 was supposed to simplify ChatGPT but now it has 4 new modes – here’s why

    August 13, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    How Title Tags Help you to Rank On SERPs

    Web Development

    CVE-2025-3925 – BrightSign Players Privilege Escalation Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Google DeepMind Introduces Genie 3: A General Purpose World Model that can Generate an Unprecedented Diversity of Interactive Environments

    Machine Learning

    CVE-2025-49185 – WordPress Cross-Site Scripting Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    My search for the ultimate multitool for under $30 is finally over

    April 3, 2025

    The NexTool E1 packs a punch in a compact design and offers multiple functions. Here’s…

    Google Chrome Vulnerability Let Attackers Escape Payload from Sandbox – Technical Details Disclosed

    April 29, 2025

    Developer Spotlight: Andrew Woan

    May 15, 2025

    CVE-2025-4084 – “Firefox/Thunderbird Escaping Vulnerability (Local Code Execution)”

    April 29, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.