diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-12-16 18:22:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-12-16 18:22:32 +0000 |
commit | 1f8893a6cd761f9ef87d4cb9c8d8baecf17b4352 (patch) | |
tree | 9db1d895d506145757dff083c0f75ec3252d30f2 /common.h | |
parent | 9f8ce02a3814161d80ae8430282eeb58ae75cbb8 (diff) | |
download | ldetect-1f8893a6cd761f9ef87d4cb9c8d8baecf17b4352.tar ldetect-1f8893a6cd761f9ef87d4cb9c8d8baecf17b4352.tar.gz ldetect-1f8893a6cd761f9ef87d4cb9c8d8baecf17b4352.tar.bz2 ldetect-1f8893a6cd761f9ef87d4cb9c8d8baecf17b4352.tar.xz ldetect-1f8893a6cd761f9ef87d4cb9c8d8baecf17b4352.zip |
now detect usb
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common.h b/common.h new file mode 100644 index 0000000..10fa22b --- /dev/null +++ b/common.h @@ -0,0 +1,10 @@ +#define psizeof(a) (sizeof(a) / sizeof(*(a))) + +static inline void *memdup(void *src, size_t size) { + void *r = malloc(size); + memcpy(r, src, size); + return r; +} +static inline void ifree(void *p) { + if (p) { free(p); p = NULL; } +} |