diff --git a/include/memory.h b/include/memory.h index ad86636..8a1e34e 100644 --- a/include/memory.h +++ b/include/memory.h @@ -9,7 +9,6 @@ char *why2_strdup(char *string); void *why2_fopen(char *name, char *modes); void *why2_fdopen(int file, char *modes); -int why2_open(char *name, int flags, unsigned int mode); void *why2_opendir(char *name); void why2_deallocate(void *pointer); diff --git a/src/core/lib/utils/memory.c b/src/core/lib/utils/memory.c index 087114c..730d9a6 100644 --- a/src/core/lib/utils/memory.c +++ b/src/core/lib/utils/memory.c @@ -20,7 +20,6 @@ enum POINTER_TYPES { ALLOCATION, FOPEN, - OPEN, OPENDIR }; @@ -161,15 +160,6 @@ void *why2_fdopen(int file, char *modes) return opened; } -int why2_open(char *name, int flags, unsigned int mode) -{ - int opened = open(name, flags, mode); - - push_to_list(&opened, OPEN); - - return opened; -} - void why2_deallocate(void *pointer) { //VARIABLES @@ -187,10 +177,6 @@ void why2_deallocate(void *pointer) fclose(pointer); break; - case OPEN: //OPEN SYSTEM CALL - close(*((int*) pointer)); //TODO: Fix global pointer problem - break; - case OPENDIR: //OPENDIR SYSTEM CALL closedir(pointer); break;