April 17, 2024, 8:56 a.m. | Anastasiia Ogneva

DEV Community dev.to

Author: Andrey Karpov


Static analyzers help not only detect errors and security flaws but also make code cleaner. Analyzers find redundant checks, duplicate actions, and other anomalies — they give the opportunity to make code simpler, nicer, and easier to read. Let's break it down with a real example of function refactoring.



Look at the C code fragment from the iSulad project.



/* container state to disk */
int container_state_to_disk(const container_t *cont)
{
int ret = 0;

if (cont == …

actions author code cpp detect down easier errors find flaws function nicer opportunity programming real refactoring security security flaws static analyzer

Social Engineer For Reverse Engineering Exploit Study

@ Independent study | Remote

Cyber Security Culture – Communication and Content Specialist

@ H&M Group | Stockholm, Sweden

Container Hardening, Sr. (Remote | Top Secret)

@ Rackner | San Antonio, TX

GRC and Information Security Analyst

@ Intertek | United States

Information Security Officer

@ Sopra Steria | Bristol, United Kingdom

Casual Area Security Officer South Down Area

@ TSS | County Down, United Kingdom