Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138843
b: refs/heads/master
c: cacbe3d
h: refs/heads/master
i:
  138841: c6598bf
  138839: cd417e4
v: v3
  • Loading branch information
Jeff Mahoney authored and Linus Torvalds committed Mar 30, 2009
1 parent 3fe201b commit 68ef8ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 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: 45b03d5e8e674eb6555b767e1c8eb40b671ff892
refs/heads/master: cacbe3d7ad3c0a345ca1ce7bf1ecb4c5bfe54d7b
12 changes: 3 additions & 9 deletions trunk/fs/reiserfs/prints.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,16 @@ static void sprintf_disk_child(char *buf, struct disk_child *dc)
dc_size(dc));
}

static char *is_there_reiserfs_struct(char *fmt, int *what, int *skip)
static char *is_there_reiserfs_struct(char *fmt, int *what)
{
char *k = fmt;

*skip = 0;

while ((k = strchr(k, '%')) != NULL) {
if (k[1] == 'k' || k[1] == 'K' || k[1] == 'h' || k[1] == 't' ||
k[1] == 'z' || k[1] == 'b' || k[1] == 'y' || k[1] == 'a') {
*what = k[1];
break;
}
(*skip)++;
k++;
}
return k;
Expand All @@ -193,18 +190,15 @@ static void prepare_error_buf(const char *fmt, va_list args)
char *fmt1 = fmt_buf;
char *k;
char *p = error_buf;
int i, j, what, skip;
int what;

strcpy(fmt1, fmt);

while ((k = is_there_reiserfs_struct(fmt1, &what, &skip)) != NULL) {
while ((k = is_there_reiserfs_struct(fmt1, &what)) != NULL) {
*k = 0;

p += vsprintf(p, fmt1, args);

for (i = 0; i < skip; i++)
j = va_arg(args, int);

switch (what) {
case 'k':
sprintf_le_key(p, va_arg(args, struct reiserfs_key *));
Expand Down

0 comments on commit 68ef8ca

Please sign in to comment.