Browse Source

Bugfix: dynclock: Use standard C struct initializer to handle initialization, instead of memsetting memory to nulls

This fixes a possible case where float 0 is not represented by null bytes
Luke Dashjr 13 years ago
parent
commit
0fff126487
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dynclock.c

+ 1 - 1
dynclock.c

@@ -13,7 +13,7 @@
 
 void dclk_prepare(struct dclk_data *data)
 {
-	memset(data, 0, sizeof(*data));
+	*data = (struct dclk_data){.freqM=0};
 }
 
 bool dclk_updateFreq(struct dclk_data *data, dclk_change_clock_func_t changeclock, struct thr_info *thr)