diff options
| author | David Woodhouse <dwmw2@infradead.org> | 2008-02-03 18:29:41 +1100 |
|---|---|---|
| committer | David Woodhouse <dwmw2@infradead.org> | 2008-02-03 18:30:32 +1100 |
| commit | c1f3ee120bb61045b1c0a3ead620d1d65af47130 (patch) | |
| tree | 908430bf2b47fe8e96ac623ae7ab6dd5698d0938 /lib/bitmap.c | |
| parent | e619a75ff6201b567a539e787aa9af9bc63a3187 (diff) | |
| parent | 9135f1901ee6449dfe338adf6e40e9c2025b8150 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'lib/bitmap.c')
| -rw-r--r-- | lib/bitmap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bitmap.c b/lib/bitmap.c index 26ebafa8c41..2c9242e3fed 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c @@ -469,6 +469,10 @@ int bitmap_scnlistprintf(char *buf, unsigned int buflen, /* current bit is 'cur', most recently seen range is [rbot, rtop] */ int cur, rbot, rtop; + if (buflen == 0) + return 0; + buf[0] = 0; + rbot = cur = find_first_bit(maskp, nmaskbits); while (cur < nmaskbits) { rtop = cur; |
