diff options
author | James Booth <boothj5@gmail.com> | 2013-08-25 23:27:42 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-08-25 23:27:42 +0100 |
commit | d3cfeb9d5cac0520d43dbf35e36d9364c35a95e5 (patch) | |
tree | e262e193eadbb95717e6b04612ace879c7be5848 /src/common.h | |
parent | 3c39befa5e565bbc3cc13a0f060a8d7a18f735f1 (diff) | |
parent | e21bf8a18d682ae95699b6ddedf17aa870303a3c (diff) | |
download | profani-tty-d3cfeb9d5cac0520d43dbf35e36d9364c35a95e5.tar.gz |
Merge branch 'master' into windows
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/common.h b/src/common.h index b87f2a97..469a63ec 100644 --- a/src/common.h +++ b/src/common.h @@ -42,18 +42,16 @@ #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) #define FREE_SET_NULL(resource) \ -{ \ - if (resource != NULL) { \ - free(resource); \ - resource = NULL; \ - } \ -} +do { \ + free(resource); \ + resource = NULL; \ +} while (0) #define GFREE_SET_NULL(resource) \ -{ \ +do { \ g_free(resource); \ resource = NULL; \ -} +} while (0) typedef enum { CONTACT_OFFLINE, @@ -74,8 +72,8 @@ typedef enum { gchar* p_utf8_substring(const gchar *str, glong start_pos, glong end_pos); void p_slist_free_full(GSList *items, GDestroyNotify free_func); -void create_dir(char *name); -void mkdir_recursive(const char *dir); +gboolean create_dir(char *name); +gboolean mkdir_recursive(const char *dir); char * str_replace(const char *string, const char *substr, const char *replacement); int str_contains(char str[], int size, char ch); |