Commit ccc76dd9 authored by vysheng's avatar vysheng

Fixed CE. Fixed tree.h to use talloc

parent 2d89884b
...@@ -27,6 +27,10 @@ ...@@ -27,6 +27,10 @@
#include <fcntl.h> #include <fcntl.h>
#include <sys/utsname.h> #include <sys/utsname.h>
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
#include "include.h" #include "include.h"
#include "mtproto-client.h" #include "mtproto-client.h"
#include "queries.h" #include "queries.h"
......
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
#include <stdio.h> #include <stdio.h>
#include <memory.h> #include <memory.h>
#ifdef HAVE_MALLOC_H #include <tools.h>
#include <malloc.h>
#endif
#include <assert.h> #include <assert.h>
#define DEFINE_TREE(X_NAME, X_TYPE, X_CMP, X_UNSET) \ #define DEFINE_TREE(X_NAME, X_TYPE, X_CMP, X_UNSET) \
...@@ -34,7 +32,7 @@ struct tree_ ## X_NAME { \ ...@@ -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 *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->x = x;\
T->y = y;\ T->y = y;\
T->left = T->right = 0;\ T->left = T->right = 0;\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment