- Timestamp:
- Nov 10, 2005, 3:24:47 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/libmondo-string.c
r89 r121 32 32 * @param partno The partition number (e.g. 1) 33 33 * @param partition Where to put the partition name (e.g. /dev/hda1) 34 * @return @p partition. 34 * @return @p partition. The caller has to free it. 35 35 * @note If @p drive ends in a digit, then 'p' (on Linux) or 's' (on *BSD) is added before @p partno. 36 36 */ … … 257 257 assert(width > 2); 258 258 259 asprintf( output, "%s", incoming);259 asprintf(&output, "%s", incoming); 260 260 for (i = (int) strlen(output); i < width; i++) { 261 261 output[i] = ' '; -
trunk/mondo/mondo/common/newt-specific.c
r94 r121 1379 1379 for (filelist->entries = 0; filelist->entries <= ARBITRARY_MAXIMUM; 1380 1380 filelist->entries++) { 1381 god_i_hate_gotos:1382 1381 if (feof(fin)) { 1383 1382 break; … … 1386 1385 i = (int) strlen(tmp); 1387 1386 if (i < 2) { 1388 goto god_i_hate_gotos; 1387 if (feof(fin)) { 1388 break; 1389 } 1389 1390 } 1390 1391 if (tmp[i - 1] < 32) { … … 1392 1393 } 1393 1394 if (i < 2) { 1394 goto god_i_hate_gotos; 1395 if (feof(fin)) { 1396 break; 1397 } 1395 1398 } 1396 1399 if (!does_file_exist(tmp)) { 1397 goto god_i_hate_gotos; 1400 if (feof(fin)) { 1401 break; 1402 } 1398 1403 } 1399 1404 filelist->el[filelist->entries].severity = -
trunk/tools/quality
r120 r121 28 28 29 29 # How many sprintf/strcat/strcpy vs asprintf are they 30 echo "monodrescue uses : `find . -name '*.c' -o -name '*.h' | egrep -v '\.svn' | egrep -v '/\*' | xargs grep -r asprintf | wc -l` asprintf" 31 echo "monodrescue uses : `find . -name '*.c' -o -name '*.h' | egrep -v '\.svn' | egrep -v '/\*' | xargs grep -r sprintf | grep -v asprintf | wc -l` sprintf" 32 echo "monodrescue uses : `find . -name '*.c' -o -name '*.h' | egrep -v '\.svn' | egrep -v '/\*' | xargs grep -r strcat | wc -l` strcat" 33 echo "monodrescue uses : `find . -name '*.c' -o -name '*.h' | egrep -v '\.svn' | egrep -v '/\*' | xargs grep -r strcpy | wc -l` strcpy" 34 echo "monodrescue uses : `find . -name '*.c' -o -name '*.h' | egrep -v '\.svn' | egrep -v '/\*' | xargs grep -r fgets | wc -l` fgets" 35 echo "monodrescue uses : `find . -name '*.c' -o -name '*.h' | egrep -v '\.svn' | egrep -v '/\*' | xargs grep -r malloc_string | wc -l` malloc_string" 36 echo "monodrescue uses : `find . -name '*.c' -o -name '*.h' | egrep -v '\.svn' | egrep -v '/\*' | xargs grep -r MAX_STR_LEN | wc -l` MAX_STR_LEN" 37 echo "monodrescue uses : `find . -name '*.c' -o -name '*.h' | egrep -v '\.svn' | egrep -v '/\*' | xargs grep -r goto | wc -l` goto" 30 for s in asprintf sprintf strcat strcpy fgets malloc_string MAX_STR_LEN goto; do 31 echo "monodrescue $s usage : " 32 for i in `find . -name '*.c' -o -name '*.h' | egrep -v '\.svn' | egrep -v '/\*' | xargs grep -r -c -w $s | egrep -v ":0$"`; do 33 echo " === $i" 34 done 35 done 38 36 39 37 echo " "
Note:
See TracChangeset
for help on using the changeset viewer.