Changeset 2296 in MondoRescue for branches/2.2.10/tools/quality


Ignore:
Timestamp:
Jul 23, 2009, 2:53:30 PM (15 years ago)
Author:
Bruno Cornec
Message:
  • Replace sprintf by mr_asprintf in mondo-rstr-compare.c
  • All mr_asprintf call should be on one line (for quality script) and use a string as second param
  • Improve quality script
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/tools/quality

    r2267 r2296  
    2828
    2929# How many sprintf/strcat/strcpy vs asprintf are they
    30 for s in asprintf mr_asprintf sprintf snprintf strcat strcpy strncpy fgets malloc mr_malloc malloc_string getline mr_getline MAX_STR_LEN getcwd goto free mr_free paranoid_free; do
     30for s in asprintf mr_asprintf sprintf snprintf strcat strcpy strncpy fgets malloc mr_malloc malloc_string getline mr_getline MAX_STR_LEN getcwd goto free mr_free paranoid_free paranoid_system; do
    3131    echo "monodrescue $s usage : "
    3232    tot=0
     
    4040echo " "
    4141echo "Qualimetry: "
    42 find . -name '*.c' -o -name '*.h' |  egrep -v '\.svn|/\*|monitas|/\*|mindi-busybox' | xargs grep -rw asprintf | egrep -v '/\*' | egrep -v 'asprintf\(&' > /tmp/mondo.quality
     42pbg -w asprintf | grep -vE 'monitas|mindi-busybox|quality|/\*|asprintf\(&' > /tmp/mondo.quality
    4343cat /tmp/mondo.quality
    4444echo "monodrescue uses : `cat /tmp/mondo.quality | wc -l` asprintf without &"
    45 find . -name '*.c' -o -name '*.h' |  egrep -v '\.svn|/\*|monitas|/\*|mindi-busybox' | xargs grep -rw getline | egrep -v '/\*' | egrep -v 'getline\(&' > /tmp/mondo.quality
     45pbg -w getline | grep -vE 'monitas|mindi-busybox|quality|/\*|getline\(&' > /tmp/mondo.quality
    4646cat /tmp/mondo.quality
    4747echo "monodrescue uses : `cat /tmp/mondo.quality | wc -l` getline without &"
    48 
     48pbg mr_asprintf | grep -vE '"|FNAME|ISOFS|syscall_sprintf|mr_mem|quality' > /tmp/mondo.quality
     49cat /tmp/mondo.quality
     50echo "monodrescue uses : `cat /tmp/mondo.quality | wc -l` mr_aspritnf without \""
    4951echo " "
    5052echo "Splint: "
Note: See TracChangeset for help on using the changeset viewer.