1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-06 06:30:19 +00:00
freebsd-ports/sysutils/LPRng/files/patch-src_common_utilities.c
Brooks Davis 9aff84db28 sysutils/LPRng: remove needless sbrk use
Move malloc_area global under defined(DEMALLOC) which contains all
consumers.  Delete unused Brk_check_size function.
2023-12-08 23:29:39 +00:00

26 lines
583 B
C

--- src/common/utilities.c.orig
+++ src/common/utilities.c
@@ -600,22 +600,6 @@
return( n );
}
-
-char *Brk_check_size( void )
-{
- static char b[128];
- static char* Top_of_mem; /* top of allocated memory */
- char *s = sbrk(0);
- int v = s - Top_of_mem;
- if( Top_of_mem == 0 ){
- plp_snprintf(b, sizeof(b), "BRK: initial value 0x%lx", Cast_ptr_to_long(s) );
- } else {
- plp_snprintf(b, sizeof(b), "BRK: new value 0x%lx, increment %d", Cast_ptr_to_long(s), v );
- }
- Top_of_mem = s;
- return(b);
-}
-
char *mystrncat( char *s1, const char *s2, int len )
{
int size;