]> git.tue.mpg.de Git - paraslash.git/commitdiff
minor mysql_selector cleanup.
authorAndre <maan@p133.(none)>
Mon, 24 Apr 2006 14:15:02 +0000 (16:15 +0200)
committerAndre <maan@p133.(none)>
Mon, 24 Apr 2006 14:15:02 +0000 (16:15 +0200)
make_message() never returns NULL, so remove the check.

mysql_selector.c

index ff94d8d7c26e5cc8fcd1095a6e1eb85e17c3a348..ff299cdf0fb59cba31abc4d6263e62b19f12cfad 100644 (file)
@@ -1840,10 +1840,10 @@ static int update_audio_file(char *name)
        ret = real_query(q);
        free(q);
 out:
-       if (ebn)
-               free(ebn);
+       free(ebn);
        return ret;
 }
+
 /* If called as child, mmd_lock must be held */
 static void update_mmd(char *info)
 {
@@ -2420,9 +2420,8 @@ static char **server_get_audio_file_list(unsigned int num)
        free(stream);
        query = make_message("%s limit %d", tmp, num);
        free(tmp);
-       if (!query)
-               goto err_out;
        result = get_result(query);
+       free(query);
        if (!result)
                goto err_out;
        num_rows = mysql_num_rows(result);
@@ -2444,8 +2443,6 @@ err_out:
        free(list);
        list = NULL;
 success:
-       if (query)
-               free(query);
        if (result)
                mysql_free_result(result);
        return list;