summaryrefslogtreecommitdiff
path: root/iomfsetgamma.c
diff options
context:
space:
mode:
Diffstat (limited to 'iomfsetgamma.c')
-rw-r--r--iomfsetgamma.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/iomfsetgamma.c b/iomfsetgamma.c
index 8f02a4c..71159d5 100644
--- a/iomfsetgamma.c
+++ b/iomfsetgamma.c
@@ -75,18 +75,19 @@ int main(int argc, char *argv[]) {
FILE *file = fopen("/tmp/.iomfgamma.dat", "r");
if (file == NULL) {
- file = fopen("/tmp/.iomfgamma.dat", "wb");
-
$IOMobileFramebufferGetGammaTable = dlsym(RTLD_DEFAULT, "IOMobileFramebufferGetGammaTable");
-
_assert($IOMobileFramebufferGetGammaTable != NULL);
error = $IOMobileFramebufferGetGammaTable(fb, data);
_assert(error == 0);
+ file = fopen("/tmp/.iomfgamma.dat", "wb");
+ _assert(file != NULL);
+
fwrite(data, 1, sizeof(data), file);
fclose(file);
file = fopen("/tmp/.iomfgamma.dat", "r");
+ _assert(file != NULL);
}
fread(data, 1, sizeof(data), file);