Skip to content

Commit

Permalink
scripts-pnmtologo-fix-for-plain-pbm-checkpatch-fixes
Browse files Browse the repository at this point in the history
ERROR: do not initialise statics to 0 or NULL
#24: FILE: scripts/pnmtologo.c:77:
+static int is_plain_pbm = 0;

WARNING: line over 80 characters
#33: FILE: scripts/pnmtologo.c:108:
+	 * between the digits. This is Ok cause we know a PBM can only have a '1'

total: 1 errors, 1 warnings, 25 lines checked

./patches/scripts-pnmtologo-fix-for-plain-pbm.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Andreas Bießmann <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
akpm00 authored and sfrothwell committed Jan 28, 2013
1 parent b8bde5b commit a1ffaf4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/pnmtologo.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ static unsigned int get_number(FILE *fp)
val = 0;
while (isdigit(c)) {
val = 10*val+c-'0';
/* 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'
* or a '0' for the digit. */
/*
* Some PBM are 'broken'; GiMP for example exports a PBM without space
* between the digits. This is OK because we know a PBM can only have a
* '1' or a '0' for the digit.
*/
if (is_plain_pbm)
break;
c = fgetc(fp);
Expand Down

0 comments on commit a1ffaf4

Please sign in to comment.