Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f21f0f16 authored by caozhiyuan's avatar caozhiyuan Committed by Elliott Hughes
Browse files

Fix parameter to lseek

Change-Id: I9c497a3ebc24ca1db92d0b9d3d1e9ac49dc40f75
parent 56543606
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ int main(int argc, char *argv[])
	int in;
	int out;
	int i;
	int ret;
	struct sparse_file *s;

	if (argc < 3) {
@@ -71,10 +70,12 @@ int main(int argc, char *argv[])
			exit(-1);
		}

		lseek(out, SEEK_SET, 0);
		if (lseek(out, 0, SEEK_SET) == -1) {
			perror("lseek failed");
			exit(EXIT_FAILURE);
		}

		ret = sparse_file_write(s, out, false, false, false);
		if (ret < 0) {
		if (sparse_file_write(s, out, false, false, false) < 0) {
			fprintf(stderr, "Cannot write output file\n");
			exit(-1);
		}