projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PCI: Add pci_ioremap_wc_bar()
[deliverable/linux.git]
/
scripts
/
dtc
/
treesource.c
diff --git
a/scripts/dtc/treesource.c
b/scripts/dtc/treesource.c
index 5740e6992d37c157d5395572341a8d53cd5d10d8..a55d1d128cce7fe03808691fd06428f9f30da2ae 100644
(file)
--- a/
scripts/dtc/treesource.c
+++ b/
scripts/dtc/treesource.c
@@
-26,12
+26,12
@@
extern int yyparse(void);
extern YYLTYPE yylloc;
struct boot_info *the_boot_info;
extern YYLTYPE yylloc;
struct boot_info *the_boot_info;
-
int
treesource_error;
+
bool
treesource_error;
struct boot_info *dt_from_source(const char *fname)
{
the_boot_info = NULL;
struct boot_info *dt_from_source(const char *fname)
{
the_boot_info = NULL;
- treesource_error =
0
;
+ treesource_error =
false
;
srcfile_push(fname);
yyin = current_srcfile->f;
srcfile_push(fname);
yyin = current_srcfile->f;
@@
-54,9
+54,9
@@
static void write_prefix(FILE *f, int level)
fputc('\t', f);
}
fputc('\t', f);
}
-static
int
isstring(char c)
+static
bool
isstring(char c)
{
{
- return (isprint(c)
+ return (isprint(
(unsigned char)
c)
|| (c == '\0')
|| strchr("\a\b\t\n\v\f\r", c));
}
|| (c == '\0')
|| strchr("\a\b\t\n\v\f\r", c));
}
@@
-109,7
+109,7
@@
static void write_propval_string(FILE *f, struct data val)
break;
case '\0':
fprintf(f, "\", ");
break;
case '\0':
fprintf(f, "\", ");
- while (m && (m->offset <
i
)) {
+ while (m && (m->offset <
= (i + 1)
)) {
if (m->type == LABEL) {
assert(m->offset == (i+1));
fprintf(f, "%s: ", m->ref);
if (m->type == LABEL) {
assert(m->offset == (i+1));
fprintf(f, "%s: ", m->ref);
@@
-119,7
+119,7
@@
static void write_propval_string(FILE *f, struct data val)
fprintf(f, "\"");
break;
default:
fprintf(f, "\"");
break;
default:
- if (isprint(c))
+ if (isprint(
(unsigned char)
c))
fprintf(f, "%c", c);
else
fprintf(f, "\\x%02hhx", c);
fprintf(f, "%c", c);
else
fprintf(f, "\\x%02hhx", c);
@@
-178,7
+178,7
@@
static void write_propval_bytes(FILE *f, struct data val)
m = m->next;
}
m = m->next;
}
- fprintf(f, "%02hhx",
*bp++
);
+ fprintf(f, "%02hhx",
(unsigned char)(*bp++)
);
if ((const void *)bp >= propend)
break;
fprintf(f, " ");
if ((const void *)bp >= propend)
break;
fprintf(f, " ");
@@
-281,3
+281,4
@@
void dt_to_source(FILE *f, struct boot_info *bi)
write_tree_source_node(f, bi->dt, 0);
}
write_tree_source_node(f, bi->dt, 0);
}
+
This page took
0.029168 seconds
and
5
git commands to generate.