summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Pang2011-10-14 16:11:12 -0500
committerIvan Pang2011-10-14 16:11:12 -0500
commitabf260d446cec73c782f2dd410deeb717ca3b07d (patch)
tree012dfea28f7b96f0303d2519adefea243a7b0d1f /hfile2array/hfile2array.c
parent0df8582d67952927c5706557843094c8e77fa178 (diff)
downloadmcsdk-tools-abf260d446cec73c782f2dd410deeb717ca3b07d.tar.gz
mcsdk-tools-abf260d446cec73c782f2dd410deeb717ca3b07d.tar.xz
mcsdk-tools-abf260d446cec73c782f2dd410deeb717ca3b07d.zip
SDOCM00083631 & SDOCM00083981 Fix\
Diffstat (limited to 'hfile2array/hfile2array.c')
-rw-r--r--hfile2array/hfile2array.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hfile2array/hfile2array.c b/hfile2array/hfile2array.c
index a6d7a5b..765821f 100644
--- a/hfile2array/hfile2array.c
+++ b/hfile2array/hfile2array.c
@@ -82,7 +82,7 @@ int main(int argc, char **argv)
82 { 82 {
83 if (fgets(line_hdr, 200, in_hdr) != NULL) 83 if (fgets(line_hdr, 200, in_hdr) != NULL)
84 { 84 {
85 if (fputs(line_hdr, out) != 0) 85 if (fputs(line_hdr, out) < 0)
86 { 86 {
87 printf ("fputs %s error\n", line_hdr); 87 printf ("fputs %s error\n", line_hdr);
88 goto error; 88 goto error;
@@ -98,7 +98,7 @@ int main(int argc, char **argv)
98 strcat (line, (const char *)(*argv++)); 98 strcat (line, (const char *)(*argv++));
99 strcat (line, "[] = {\n"); 99 strcat (line, "[] = {\n");
100 100
101 if (fputs(line, out) != 0) 101 if (fputs(line, out) < 0)
102 { 102 {
103 printf ("fputs %s error\n", line); 103 printf ("fputs %s error\n", line);
104 goto error; 104 goto error;
@@ -108,7 +108,7 @@ int main(int argc, char **argv)
108 { 108 {
109 if (fgets(line, 200, in) != NULL) 109 if (fgets(line, 200, in) != NULL)
110 { 110 {
111 if (fputs(line, out) != 0) 111 if (fputs(line, out) < 0)
112 { 112 {
113 printf ("fputs %s error\n", fputs); 113 printf ("fputs %s error\n", fputs);
114 goto error; 114 goto error;
@@ -121,7 +121,7 @@ int main(int argc, char **argv)
121 } 121 }
122 } 122 }
123 123
124 if (fputs("};\n", out) != 0) 124 if (fputs("};\n", out) < 0)
125 { 125 {
126 printf ("fputs %s error\n", fputs); 126 printf ("fputs %s error\n", fputs);
127 goto error; 127 goto error;
@@ -139,4 +139,4 @@ error:
139 fclose(out); 139 fclose(out);
140 140
141 return (-1); 141 return (-1);
142} \ No newline at end of file 142}