Skip to content

Commit 9314e36

Browse files
committed
balh:
1 parent 3974162 commit 9314e36

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

sigtool/sigtool.c

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@ static int qcompare(const void *a, const void *b)
709709
}
710710

711711
char *createTempDir(const struct optstruct *opts);
712-
void removeTempDir(const struct optstruct *opts, char * dir){
712+
void removeTempDir(const struct optstruct *opts, char *dir)
713+
{
713714
if (!optget(opts, "leave-temps")->enabled) {
714715
cli_rmdirs(dir);
715716
}
@@ -1104,7 +1105,7 @@ static int build(const struct optstruct *opts)
11041105

11051106
if (CL_SUCCESS != cl_cvdunpack(olddb, pt, true)) {
11061107
mprintf(LOGG_ERROR, "build: Can't unpack CVD file %s\n", olddb);
1107-
removeTempDir(opts, pt);
1108+
removeTempDir(opts, pt);
11081109
free(pt);
11091110
unlink(newcvd);
11101111
return -1;
@@ -1128,7 +1129,7 @@ static int build(const struct optstruct *opts)
11281129

11291130
snprintf(patch, sizeof(patch), "%s-%u.script", dbname, version);
11301131
ret = diffdirs(olddb, pt, patch);
1131-
removeTempDir(opts, pt);
1132+
removeTempDir(opts, pt);
11321133
free(pt);
11331134

11341135
if (ret == -1) {
@@ -1730,7 +1731,7 @@ static int vbadump(const struct optstruct *opts)
17301731
}
17311732
scanfile(filename, engine, opts, &options);
17321733

1733-
removeTempDir(opts, engine->tmpdir);
1734+
removeTempDir(opts, engine->tmpdir);
17341735

17351736
ret = 0;
17361737
done:
@@ -2116,21 +2117,21 @@ static int verifydiff(const struct optstruct *opts, const char *diff, const char
21162117

21172118
if (!getcwd(cwd, sizeof(cwd))) {
21182119
mprintf(LOGG_ERROR, "verifydiff: getcwd() failed\n");
2119-
removeTempDir(opts, tempdir);
2120+
removeTempDir(opts, tempdir);
21202121
free(tempdir);
21212122
return -1;
21222123
}
21232124

21242125
if ((fd = open(diff, O_RDONLY | O_BINARY)) == -1) {
21252126
mprintf(LOGG_ERROR, "verifydiff: Can't open diff file %s\n", diff);
2126-
removeTempDir(opts, tempdir);
2127+
removeTempDir(opts, tempdir);
21272128
free(tempdir);
21282129
return -1;
21292130
}
21302131

21312132
if (chdir(tempdir) == -1) {
21322133
mprintf(LOGG_ERROR, "verifydiff: Can't chdir to %s\n", tempdir);
2133-
removeTempDir(opts, tempdir);
2134+
removeTempDir(opts, tempdir);
21342135
free(tempdir);
21352136
close(fd);
21362137
return -1;
@@ -2140,7 +2141,7 @@ static int verifydiff(const struct optstruct *opts, const char *diff, const char
21402141
mprintf(LOGG_ERROR, "verifydiff: Can't apply %s\n", diff);
21412142
if (chdir(cwd) == -1)
21422143
mprintf(LOGG_WARNING, "verifydiff: Can't chdir to %s\n", cwd);
2143-
removeTempDir(opts, tempdir);
2144+
removeTempDir(opts, tempdir);
21442145
free(tempdir);
21452146
close(fd);
21462147
return -1;
@@ -2151,7 +2152,7 @@ static int verifydiff(const struct optstruct *opts, const char *diff, const char
21512152

21522153
if (chdir(cwd) == -1)
21532154
mprintf(LOGG_WARNING, "verifydiff: Can't chdir to %s\n", cwd);
2154-
removeTempDir(opts, tempdir);
2155+
removeTempDir(opts, tempdir);
21552156
free(tempdir);
21562157

21572158
if (!ret) {
@@ -3335,8 +3336,8 @@ static int makediff(const struct optstruct *opts)
33353336
snprintf(name, sizeof(name), "%s-%u.script", getdbname(opts->filename[0], dbname, sizeof(dbname)), newver);
33363337
ret = diffdirs(odir, ndir, name);
33373338

3338-
removeTempDir(opts, odir);
3339-
removeTempDir(opts, ndir);
3339+
removeTempDir(opts, odir);
3340+
removeTempDir(opts, ndir);
33403341
free(odir);
33413342
free(ndir);
33423343

0 commit comments

Comments
 (0)