Examples: Correct arguments to perror

This commit is contained in:
shahramn 2024-03-08 12:07:53 +00:00
parent 4752afb09e
commit 73a147286f
5 changed files with 5 additions and 5 deletions

View File

@ -68,7 +68,7 @@ int main(int argc, char* argv[])
CODES_CHECK(codes_get_message(clone_handle, &buffer, &size), 0);
/* write the buffer to a file */
if (fwrite(buffer, 1, size, out) != size) {
perror(argv[1]);
perror(argv[2]);
return 1;
}
codes_handle_delete(clone_handle);

View File

@ -116,7 +116,7 @@ int main(int argc, char** argv)
/* write the buffer in a file*/
if (fwrite(buffer, 1, size, out) != size) {
perror(argv[1]);
perror(outfile);
exit(1);
}

View File

@ -78,7 +78,7 @@ int main(int argc, char** argv)
/* write the buffer in a file*/
if (fwrite(buffer, 1, size, out) != size) {
perror(argv[1]);
perror(outfile);
exit(1);
}

View File

@ -77,7 +77,7 @@ int main(int argc, char** argv)
/* write the buffer in a file*/
if (fwrite(buffer, 1, size, out) != size) {
perror(argv[1]);
perror(outfile);
exit(1);
}

View File

@ -78,7 +78,7 @@ int main(int argc, char** argv)
/* write the buffer in a file*/
if (fwrite(buffer, 1, size, out) != size) {
perror(argv[1]);
perror(outfile);
exit(1);
}