Fixed CE. Fixed tree.h to use talloc
This commit is contained in:
parent
13e8996028
commit
fad27bbd39
2 changed files with 6 additions and 4 deletions
|
@ -27,6 +27,10 @@
|
|||
#include <fcntl.h>
|
||||
#include <sys/utsname.h>
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 4096
|
||||
#endif
|
||||
|
||||
#include "include.h"
|
||||
#include "mtproto-client.h"
|
||||
#include "queries.h"
|
||||
|
|
6
tree.h
6
tree.h
|
@ -21,9 +21,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include <memory.h>
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <tools.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define DEFINE_TREE(X_NAME, X_TYPE, X_CMP, X_UNSET) \
|
||||
|
@ -34,7 +32,7 @@ struct tree_ ## X_NAME { \
|
|||
};\
|
||||
\
|
||||
struct tree_ ## X_NAME *new_tree_node_ ## X_NAME (X_TYPE x, int y) {\
|
||||
struct tree_ ## X_NAME *T = malloc (sizeof (*T));\
|
||||
struct tree_ ## X_NAME *T = talloc (sizeof (*T));\
|
||||
T->x = x;\
|
||||
T->y = y;\
|
||||
T->left = T->right = 0;\
|
||||
|
|
Loading…
Add table
Reference in a new issue