merge/upstream-full #105
@@ -679,12 +679,12 @@ get_file_paths_recursive(const char* path, GSList** contents)
|
||||
}
|
||||
}
|
||||
|
||||
char*
|
||||
gchar*
|
||||
get_random_string(int length)
|
||||
{
|
||||
GRand* prng;
|
||||
char* rand;
|
||||
char alphabet[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
gchar* rand;
|
||||
gchar alphabet[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
int endrange = sizeof(alphabet) - 1;
|
||||
|
||||
rand = g_malloc0(length + 1);
|
||||
|
||||
@@ -206,7 +206,7 @@ int is_regular_file(const char* path);
|
||||
int is_dir(const char* path);
|
||||
void get_file_paths_recursive(const char* directory, GSList** contents);
|
||||
|
||||
char* get_random_string(int length);
|
||||
gchar* get_random_string(int length);
|
||||
|
||||
gboolean call_external(gchar** argv);
|
||||
gchar** format_call_external_argv(const char* template, const char* url, const char* filename);
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
typedef struct aesgcm_download_t
|
||||
{
|
||||
char* id;
|
||||
gchar* id;
|
||||
char* url;
|
||||
char* filename;
|
||||
char* cmd_template;
|
||||
|
||||
@@ -830,10 +830,10 @@ connection_free_uuid(char* uuid)
|
||||
}
|
||||
}
|
||||
|
||||
char*
|
||||
gchar*
|
||||
connection_create_stanza_id(void)
|
||||
{
|
||||
auto_char char* rndid = get_random_string(CON_RAND_ID_LEN);
|
||||
auto_gchar gchar* rndid = get_random_string(CON_RAND_ID_LEN);
|
||||
assert(rndid != NULL);
|
||||
|
||||
auto_gchar gchar* hmac = g_compute_hmac_for_string(G_CHECKSUM_SHA1,
|
||||
|
||||
@@ -203,7 +203,7 @@ jid_fulljid_or_barejid(Jid* jid)
|
||||
gchar*
|
||||
jid_random_resource(void)
|
||||
{
|
||||
auto_char char* rand = get_random_string(4);
|
||||
auto_gchar gchar* rand = get_random_string(4);
|
||||
|
||||
gchar* result = g_strdup_printf("profanity.%s", rand);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user