Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224021
b: refs/heads/master
c: 2bf1c05
h: refs/heads/master
i:
  224019: 1a86ef9
v: v3
  • Loading branch information
Nikitas Angelinas authored and Thomas Gleixner committed Oct 21, 2010
1 parent 9e6ceaf commit 8ded0eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aaabe31c25a439b92cc281b14ca18b85bae7e7a6
refs/heads/master: 2bf1c05e3c406925e498d06da66b4828f0209ea6
5 changes: 3 additions & 2 deletions trunk/kernel/time/timecompare.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/math64.h>
#include <linux/kernel.h>

/*
* fixed point arithmetic scale factor for skew
Expand Down Expand Up @@ -57,11 +58,11 @@ int timecompare_offset(struct timecompare *sync,
int index;
int num_samples = sync->num_samples;

if (num_samples > sizeof(buffer)/sizeof(buffer[0])) {
if (num_samples > ARRAY_SIZE(buffer)) {
samples = kmalloc(sizeof(*samples) * num_samples, GFP_ATOMIC);
if (!samples) {
samples = buffer;
num_samples = sizeof(buffer)/sizeof(buffer[0]);
num_samples = ARRAY_SIZE(buffer);
}
} else {
samples = buffer;
Expand Down

0 comments on commit 8ded0eb

Please sign in to comment.