You need to sign in or sign up before continuing.
提交 044b14b5 编写于 作者: N Nikita Romanyuk 提交者: Helge Deller

drivers: video: logo: fix code style issues in pnmtologo.c

Signed-off-by: NNikita Romanyuk <ufh8945@gmail.com>
Signed-off-by: NHelge Deller <deller@gmx.de>
上级 eeac8ede
/* /*
* Convert a logo in ASCII PNM format to C source suitable for inclusion in * Convert a logo in ASCII PNM format to C source suitable for inclusion in
* the Linux kernel * the Linux kernel
...@@ -77,8 +76,8 @@ static unsigned int logo_clutsize; ...@@ -77,8 +76,8 @@ static unsigned int logo_clutsize;
static int is_plain_pbm = 0; static int is_plain_pbm = 0;
static void die(const char *fmt, ...) static void die(const char *fmt, ...)
__attribute__ ((noreturn)) __attribute ((format (printf, 1, 2))); __attribute__((noreturn)) __attribute((format (printf, 1, 2)));
static void usage(void) __attribute ((noreturn)); static void usage(void) __attribute((noreturn));
static unsigned int get_number(FILE *fp) static unsigned int get_number(FILE *fp)
...@@ -106,7 +105,8 @@ static unsigned int get_number(FILE *fp) ...@@ -106,7 +105,8 @@ static unsigned int get_number(FILE *fp)
val = 10*val+c-'0'; val = 10*val+c-'0';
/* some PBM are 'broken'; GiMP for example exports a PBM without space /* some PBM are 'broken'; GiMP for example exports a PBM without space
* between the digits. This is Ok cause we know a PBM can only have a '1' * between the digits. This is Ok cause we know a PBM can only have a '1'
* or a '0' for the digit. */ * or a '0' for the digit.
*/
if (is_plain_pbm) if (is_plain_pbm)
break; break;
c = fgetc(fp); c = fgetc(fp);
...@@ -119,6 +119,7 @@ static unsigned int get_number(FILE *fp) ...@@ -119,6 +119,7 @@ static unsigned int get_number(FILE *fp)
static unsigned int get_number255(FILE *fp, unsigned int maxval) static unsigned int get_number255(FILE *fp, unsigned int maxval)
{ {
unsigned int val = get_number(fp); unsigned int val = get_number(fp);
return (255*val+maxval/2)/maxval; return (255*val+maxval/2)/maxval;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册