target_scale: Fixed a `break strict-aliasing rules' compiler warning.
authorSebastian Harl <sh@tokkee.org>
Tue, 30 Mar 2010 20:55:06 +0000 (22:55 +0200)
committerSebastian Harl <sh@tokkee.org>
Tue, 30 Mar 2010 20:55:06 +0000 (22:55 +0200)
… identified by GCC 4.4.3 using -O3.

src/target_scale.c

index 6b261c7..29fecdf 100644 (file)
@@ -302,11 +302,15 @@ static int ts_config_set_double (double *ret, oconfig_item_t *ci) /* {{{ */
 
 static int ts_destroy (void **user_data) /* {{{ */
 {
+       ts_data_t **data;
+
        if (user_data == NULL)
                return (-EINVAL);
 
-       free (*user_data);
-       *user_data = NULL;
+       data = (ts_data_t **) user_data;
+
+       free (*data);
+       *data = NULL;
 
        return (0);
 } /* }}} int ts_destroy */