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

      How AI further empowers value stream management

      June 27, 2025

      12 Top ReactJS Development Companies in 2025

      June 27, 2025

      Not sure where to go with AI? Here’s your roadmap.

      June 27, 2025

      This week in AI dev tools: A2A donated to Linux Foundation, OpenAI adds Deep Research to API, and more (June 27, 2025)

      June 27, 2025

      The next big HDMI leap has arrived – here’s how these 16K cables will shake things up

      June 27, 2025

      Here’s how you can still trade in any phone at Verizon to get an iPhone, iPad, and Apple Watch free

      June 27, 2025

      Anthropic has a plan to combat AI-triggered job losses predicted by its CEO

      June 27, 2025

      Forget Google and Microsoft: OpenAI may be building the ultimate work suite of apps and services

      June 27, 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

      Say hello to ECMAScript 2025

      June 27, 2025
      Recent

      Say hello to ECMAScript 2025

      June 27, 2025

      Ecma International approves ECMAScript 2025: What’s new?

      June 27, 2025

      Building Together: PRFT Colleagues Volunteer with Atlanta Habitat for Humanity

      June 27, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Fix Elden Ring Nightreign Connection Errors And Server Login Failure PC

      June 27, 2025
      Recent

      Fix Elden Ring Nightreign Connection Errors And Server Login Failure PC

      June 27, 2025

      Fix Now EAC Error 20006 in Elden Ring: Nightreign [6 Easy Tricks]

      June 27, 2025

      Fix Now Elden Ring Nightreign EAC Error 30005 (CreateFile Failed)

      June 27, 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 next big HDMI leap has arrived – here’s how these 16K cables will shake things up

    June 27, 2025
    News & Updates

    Here’s how you can still trade in any phone at Verizon to get an iPhone, iPad, and Apple Watch free

    June 27, 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

    Play ransomware crims exploit SimpleHelp flaw in double-extortion schemes

    Security

    Good Vibes Only: A Vibe Coding Primer

    Development

    CVE-2025-31261 – Apple macOS User Data Access Permissions Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Distribution Release: Rocky Linux 9.6

    News & Updates

    Highlights

    CVE-2025-52442 – Apache HTTP Server Unvalidated User Input

    June 17, 2025

    CVE ID : CVE-2025-52442

    Published : June 17, 2025, 3:15 a.m. | 3 hours, 9 minutes ago

    Description : Rejected reason: Not used

    Severity: 0.0 | NA

    Visit the link for more details, such as CVSS details, affected products, timeline, and more…

    Meta Launches Its Own AI App to Challenge ChatGPT

    April 30, 2025

    Four trends reshaping Kubernetes platform engineering

    May 13, 2025

    Sam Altman says “OpenAI was forced to do a lot of unnatural things” to meet the Ghibli memes demand surge

    June 13, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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