comparison dbutil.c @ 650:df11cb6a3665

- We don't need to test for NULL before free()
author Matt Johnston <matt@ucc.asn.au>
date Sun, 04 Dec 2011 05:23:43 +0800
parents 452bcf810e44
children 16af1decaf4c
comparison
equal deleted inserted replaced
649:234cf769bcb3 650:df11cb6a3665
798 dropbear_exit("m_strdup failed"); 798 dropbear_exit("m_strdup failed");
799 } 799 }
800 return ret; 800 return ret;
801 } 801 }
802 802
803 void __m_free(void* ptr) {
804 if (ptr != NULL) {
805 free(ptr);
806 }
807 }
808
809 void * m_realloc(void* ptr, size_t size) { 803 void * m_realloc(void* ptr, size_t size) {
810 804
811 void *ret; 805 void *ret;
812 806
813 if (size == 0) { 807 if (size == 0) {