Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return type "void" for "my_free" #6

Open
elfring opened this issue Sep 28, 2014 · 0 comments
Open

Return type "void" for "my_free" #6

elfring opened this issue Sep 28, 2014 · 0 comments

Comments

@elfring
Copy link

elfring commented Sep 28, 2014

How do you think about to integrate the following small update suggestion into your source code repository?

diff --git a/glimpse/index/glimpse.h b/glimpse/index/glimpse.h
index 317b8c8..2df9414 100644
--- a/glimpse/index/glimpse.h
+++ b/glimpse/index/glimpse.h
@@ -216,7 +216,7 @@ struct offsets {

 /* Memory allocators: in io.c */
 extern char *my_malloc();
-extern int my_free();
+extern void my_free();
 extern FILE *my_fopen();
 extern int my_open(), my_stat(), my_lstat();
 extern char *wordalloc();
diff --git a/glimpse/index/region.h b/glimpse/index/region.h
index 9615c73..7b50486 100644
--- a/glimpse/index/region.h
+++ b/glimpse/index/region.h
@@ -28,5 +28,5 @@ typedef struct ATTR_ELEMENT {

 extern FILE *my_fopen();
 extern char *my_malloc();
-extern int my_free();
+extern void my_free();
 #endif /*_REGION_H_*/
diff --git a/index/glimpse.h b/index/glimpse.h
index 317b8c8..2df9414 100644
--- a/index/glimpse.h
+++ b/index/glimpse.h
@@ -216,7 +216,7 @@ struct offsets {

 /* Memory allocators: in io.c */
 extern char *my_malloc();
-extern int my_free();
+extern void my_free();
 extern FILE *my_fopen();
 extern int my_open(), my_stat(), my_lstat();
 extern char *wordalloc();
diff --git a/index/io.c b/index/io.c
index 5ce5837..7844caf 100644
--- a/index/io.c
+++ b/index/io.c
@@ -659,7 +659,7 @@ my_malloc(len)
     return s;
 }

-my_free(ptr, size)
+void my_free(ptr, size)
    void *ptr;
    int size;
 {
diff --git a/index/region.h b/index/region.h
index 9615c73..7b50486 100644
--- a/index/region.h
+++ b/index/region.h
@@ -28,5 +28,5 @@ typedef struct ATTR_ELEMENT {

 extern FILE *my_fopen();
 extern char *my_malloc();
-extern int my_free();
+extern void my_free();
 #endif /*_REGION_H_*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant