open Udiff src/java.desktop/unix/native/common/awt/fontpath.c (original) (raw)
@@ -206,11 +206,11 @@
doNotAppend = 0;
if ( fDirP->num == 0 ) return;
- appendDirList = SAFE_SIZE_ARRAY_ALLOC(malloc, fDirP->num, sizeof ( int ));
appendDirList = SAFE_SIZE_ARRAY_ALLOC(malloc, fDirP->num, (int)sizeof ( int )); if ( appendDirList == NULL ) { return; /* if it fails we cannot do much */ }
origFontPath = XGetFontPath ( awt_display, &nPaths );
@@ -263,11 +263,11 @@ XFreeFontPath ( origFontPath ); return; }
- newFontPath = SAFE_SIZE_ARRAY_ALLOC(malloc, totalDirCount, sizeof(char *));
- newFontPath = SAFE_SIZE_ARRAY_ALLOC(malloc, totalDirCount, (int)sizeof(char )); / if it fails free things and get out */ if ( newFontPath == NULL ) { free ( ( void *) appendDirList ); XFreeFontPath ( origFontPath ); return;
@@ -284,11 +284,11 @@
if ( appendDirList[index] == 1 ) {
/* printf ( "Appending %s\n", fDirP->name[index] ); */
onePath = SAFE_SIZE_ARRAY_ALLOC(malloc, strlen (fDirP->name[index]) + 2, sizeof( char ) );
onePath = SAFE_SIZE_ARRAY_ALLOC(malloc, (int)strlen (fDirP->name[index]) + 2, (int)sizeof( char ) ); if (onePath == NULL) { free ( ( void *) appendDirList ); for ( index = origIndex; index < nPaths; index++ ) { free( newFontPath[index] );