Skip to content
Snippets Groups Projects
  • Stephan Bosch's avatar
    131ea974
    global: Replaced all instances of memset(p, 0, sizeof(*p)) with the new i_zero() macro. · 131ea974
    Stephan Bosch authored
    Used the following script:
    
    C_FILES=`git ls-files *.c`
    H_FILES=`git ls-files *.h`
    for F in "$C_FILES $H_FILES"; do
            echo "$F"
      perl -p -i -e 's/safe_memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero_safe(&$1)/g' $F
      perl -p -i -e 's/safe_memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero_safe($1)/g' $F
      perl -p -i -e 's/memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero(&$1)/g' $F
      perl -p -i -e 's/memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero($1)/g' $F
    done
    131ea974
    History
    global: Replaced all instances of memset(p, 0, sizeof(*p)) with the new i_zero() macro.
    Stephan Bosch authored
    Used the following script:
    
    C_FILES=`git ls-files *.c`
    H_FILES=`git ls-files *.h`
    for F in "$C_FILES $H_FILES"; do
            echo "$F"
      perl -p -i -e 's/safe_memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero_safe(&$1)/g' $F
      perl -p -i -e 's/safe_memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero_safe($1)/g' $F
      perl -p -i -e 's/memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero(&$1)/g' $F
      perl -p -i -e 's/memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero($1)/g' $F
    done

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.