Skip to content

Commit

Permalink
V4L/DVB (6684): Complement va_start() with va_end() + style fixes
Browse files Browse the repository at this point in the history
Complement va_start() with va_end() + minor style fixes in the same function.

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Richard Knutsson authored and Mauro Carvalho Chehab committed Dec 11, 2007
1 parent 174eb8e commit b730a81
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 6 additions & 4 deletions drivers/media/video/saa5246a.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,14 @@ static int i2c_senddata(struct saa5246a_device *t, ...)
{
unsigned char buf[64];
int v;
int ct=0;
int ct = 0;
va_list argp;
va_start(argp,t);
va_start(argp, t);

while((v=va_arg(argp,int))!=-1)
buf[ct++]=v;
while ((v = va_arg(argp, int)) != -1)
buf[ct++] = v;

va_end(argp);
return i2c_sendbuf(t, buf[0], ct-1, buf+1);
}

Expand Down
8 changes: 5 additions & 3 deletions drivers/media/video/saa5249.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,14 @@ static int i2c_senddata(struct saa5249_device *t, ...)
{
unsigned char buf[64];
int v;
int ct=0;
int ct = 0;
va_list argp;
va_start(argp,t);

while((v=va_arg(argp,int))!=-1)
buf[ct++]=v;
while ((v = va_arg(argp, int)) != -1)
buf[ct++] = v;

va_end(argp);
return i2c_sendbuf(t, buf[0], ct-1, buf+1);
}

Expand Down

0 comments on commit b730a81

Please sign in to comment.