Welcome to the Builder Academy

Question Won't Set to NULL

More
13 Sep 2015 20:20 - 13 Sep 2015 20:24 #5514 by krell
Won't Set to NULL was created by krell
I've been playing around with MALLOC_STATS in an attempt to close up memory leaks on tba running on my OpenBSD box. I've gone through db.c and have been NULL'ing all the non NULL'd FREE's I could find since some dynamically allocated pointers were identified in the data.

GET_NAME(ch) is interesting, it is FREE'd but any attempt to set it to NULL result in the compiler complaining about on improper comparison statement. "lvalue required as left operand of assignment"

Is there something special about GET_NAME(ch) that I can't set it? Should I even trying setting GET_NAME(cha) or is there something fundamentally important that I'm missing that could result in disaster because I don't understand something?


Attachment 2015-09-13-193345_1175x957_scrot.png not found

Attachments:
Last edit: 13 Sep 2015 20:24 by krell.

Please Log in or Create an account to join the conversation.

More
13 Sep 2015 21:29 #5515 by krell
Replied by krell on topic Won't Set to NULL
I found the #define for GET_NAME(ch) in utils.h. Evidently GET_NAME(ch) is a define for an if-else statement hence the compiler error.


Attachment Screenshot_2015-09-13-21-20-47.png not found

Attachments:
The following user(s) said Thank You: thomas

Please Log in or Create an account to join the conversation.

More
14 Sep 2015 19:28 #5516 by thomas
Replied by thomas on topic Won't Set to NULL
I like that you answered your own question, instead of just forgetting to update us on the progress, like I used to do ;)

Please Log in or Create an account to join the conversation.

Time to create page: 0.176 seconds