mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix uninitialized value
This commit is contained in:
parent
83dfb31dc2
commit
339e45b205
1 changed files with 3 additions and 2 deletions
|
@ -67,7 +67,7 @@ static int hook_shift(struct hook *h, int when, struct hook_info *k)
|
|||
|
||||
case HOOK_READ:
|
||||
for (int i = 0; i < k->cnt; i++) {
|
||||
struct timespec *ts;
|
||||
struct timespec *ts = NULL;
|
||||
|
||||
switch (private->mode) {
|
||||
case TS_ORIGIN: ts = &k->smps[i]->ts.origin; break;
|
||||
|
@ -75,7 +75,8 @@ static int hook_shift(struct hook *h, int when, struct hook_info *k)
|
|||
case TS_SENT: ts = &k->smps[i]->ts.sent; break;
|
||||
}
|
||||
|
||||
*ts = time_add(ts, &private->offset);
|
||||
if (ts)
|
||||
*ts = time_add(ts, &private->offset);
|
||||
}
|
||||
|
||||
return k->cnt;
|
||||
|
|
Loading…
Add table
Reference in a new issue