diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-12-30 22:43:52 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-12-30 22:43:52 +0000 |
commit | f5a017ed63ee50feeefc6f0c2b28549aeca92ded (patch) | |
tree | efb619e68756960821ff3ad667a1452db9add7f7 /src/util/os_installation.c | |
parent | 416c2f5a713b93ba689a8cd1e038682a53e6bc17 (diff) | |
download | gnunet-f5a017ed63ee50feeefc6f0c2b28549aeca92ded.tar.gz gnunet-f5a017ed63ee50feeefc6f0c2b28549aeca92ded.zip |
-LRN: use FOPEN/CLOSE instead of fopen/close - #2051
Diffstat (limited to 'src/util/os_installation.c')
-rw-r--r-- | src/util/os_installation.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index c5cf1ccb3..6d25c5709 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c | |||
@@ -56,7 +56,7 @@ get_path_from_proc_maps () | |||
56 | char *lgu; | 56 | char *lgu; |
57 | 57 | ||
58 | GNUNET_snprintf (fn, sizeof (fn), "/proc/%u/maps", getpid ()); | 58 | GNUNET_snprintf (fn, sizeof (fn), "/proc/%u/maps", getpid ()); |
59 | f = fopen (fn, "r"); | 59 | f = FOPEN (fn, "r"); |
60 | if (f == NULL) | 60 | if (f == NULL) |
61 | return NULL; | 61 | return NULL; |
62 | while (NULL != fgets (line, sizeof (line), f)) | 62 | while (NULL != fgets (line, sizeof (line), f)) |
@@ -66,11 +66,11 @@ get_path_from_proc_maps () | |||
66 | (NULL != (lgu = strstr (dir, "libgnunetutil")))) | 66 | (NULL != (lgu = strstr (dir, "libgnunetutil")))) |
67 | { | 67 | { |
68 | lgu[0] = '\0'; | 68 | lgu[0] = '\0'; |
69 | fclose (f); | 69 | FCLOSE (f); |
70 | return GNUNET_strdup (dir); | 70 | return GNUNET_strdup (dir); |
71 | } | 71 | } |
72 | } | 72 | } |
73 | fclose (f); | 73 | FCLOSE (f); |
74 | return NULL; | 74 | return NULL; |
75 | } | 75 | } |
76 | 76 | ||