--- embedaddon/rsync/params.c 2013/10/14 07:51:14 1.1.1.2 +++ embedaddon/rsync/params.c 2021/03/17 00:32:36 1.1.1.3 @@ -1,5 +1,5 @@ /* This modules is based on the params.c module from Samba, written by Karl Auer - and much modifed by Christopher Hertel. */ + and much modified by Christopher Hertel. */ /* * This program is free software; you can redistribute it and/or modify @@ -59,7 +59,7 @@ * beginning with either a semicolon (';') or a pound sign ('#'). * * All whitespace in section names and parameter names is compressed - * to single spaces. Leading and trailing whitespace is stipped from + * to single spaces. Leading and trailing whitespace is stripped from * both names and values. * * Only the first equals sign in a parameter line is significant. @@ -153,7 +153,7 @@ static int EatComment( FILE *InFile ) static int Continuation( char *line, int pos ) /* ------------------------------------------------------------------------ ** - * Scan backards within a string to discover if the last non-whitespace + * Scan backwards within a string to discover if the last non-whitespace * character is a line-continuation character ('\\'). * * Input: line - A pointer to a buffer containing the string to be @@ -212,11 +212,6 @@ static BOOL Section( FILE *InFile, BOOL (*sfunc)(char { bSize += BUFR_INC; bufr = realloc_array( bufr, char, bSize ); - if( NULL == bufr ) - { - rprintf(FLOG, "%s Memory re-allocation failure.", func); - return( False ); - } } /* Handle a single character. */ @@ -306,11 +301,6 @@ static BOOL Parameter( FILE *InFile, BOOL (*pfunc)(cha { bSize += BUFR_INC; bufr = realloc_array( bufr, char, bSize ); - if( NULL == bufr ) - { - rprintf(FLOG, "%s Memory re-allocation failure.", func) ; - return( False ); - } } switch( c ) @@ -382,11 +372,6 @@ static BOOL Parameter( FILE *InFile, BOOL (*pfunc)(cha { bSize += BUFR_INC; bufr = realloc_array( bufr, char, bSize ); - if( NULL == bufr ) - { - rprintf(FLOG, "%s Memory re-allocation failure.", func) ; - return( False ); - } } switch( c ) @@ -639,12 +624,6 @@ int pm_process( char *FileName, { /* allocate one, then parse, */ bSize = BUFR_INC; /* then free. */ bufr = new_array( char, bSize ); - if( NULL == bufr ) - { - rprintf(FLOG, "%s memory allocation failure.\n", func); - fclose(InFile); - return( False ); - } result = Parse( InFile, sfunc, pfunc ); free( bufr ); bufr = NULL;