Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164522
b: refs/heads/master
c: 2f30b1f
h: refs/heads/master
v: v3
  • Loading branch information
Marcin Slusarz authored and Linus Torvalds committed Sep 22, 2009
1 parent 3891150 commit 4d24bd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 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: efc03ecb9d674588a13aee27289c2af2afe5e6b4
refs/heads/master: 2f30b1f9e1b612cdd1a17daeecf514229e8d6a5f
14 changes: 2 additions & 12 deletions trunk/lib/vsprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1092,13 +1092,8 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)

/* Reject out-of-range values early. Large positive sizes are
used for unknown buffer sizes. */
if (unlikely((int) size < 0)) {
/* There can be only one.. */
static char warn = 1;
WARN_ON(warn);
warn = 0;
if (WARN_ON_ONCE((int) size < 0))
return 0;
}

str = buf;
end = buf + size;
Expand Down Expand Up @@ -1544,13 +1539,8 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)

struct printf_spec spec = {0};

if (unlikely((int) size < 0)) {
/* There can be only one.. */
static char warn = 1;
WARN_ON(warn);
warn = 0;
if (WARN_ON_ONCE((int) size < 0))
return 0;
}

str = buf;
end = buf + size;
Expand Down

0 comments on commit 4d24bd8

Please sign in to comment.