Last change
on this file since 413 was 398, checked in by coas-nagasima, 5 years ago |
mbedTLS版Azure IoT Hub接続サンプルのソースコードを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
335 bytes
|
Rev | Line | |
---|
[398] | 1 | #define _GNU_SOURCE
|
---|
| 2 | #include <stdlib.h>
|
---|
| 3 | #include <search.h>
|
---|
| 4 |
|
---|
| 5 | struct node {
|
---|
| 6 | void *key;
|
---|
| 7 | struct node *left;
|
---|
| 8 | struct node *right;
|
---|
| 9 | };
|
---|
| 10 |
|
---|
| 11 | void tdestroy(void *root, void (*freekey)(void *))
|
---|
| 12 | {
|
---|
| 13 | struct node *r = root;
|
---|
| 14 |
|
---|
| 15 | if (r == 0)
|
---|
| 16 | return;
|
---|
| 17 | tdestroy(r->left, freekey);
|
---|
| 18 | tdestroy(r->right, freekey);
|
---|
| 19 | if (freekey) freekey(r->key);
|
---|
| 20 | free(r);
|
---|
| 21 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.