diff options
author | Maksym Telychko <maksym.telychko@globallogic.com> | 2020-04-16 22:48:28 +0300 |
---|---|---|
committer | Maksym Telychko <maksym.telychko@globallogic.com> | 2020-04-18 09:02:18 +0300 |
commit | af7b696d3b516aa68995503f642495f3a7082e6d (patch) | |
tree | 37e982ad9a2745bc18a174735d591d65ac2819d8 /src/utils.h | |
parent | 3775f2cc016eefc615c1adc4a22b16ea7b010a91 (diff) | |
download | sms-utils-af7b696d3b516aa68995503f642495f3a7082e6d.tar.gz sms-utils-af7b696d3b516aa68995503f642495f3a7082e6d.tar.bz2 sms-utils-af7b696d3b516aa68995503f642495f3a7082e6d.zip |
MTX-3262 mpower: fix resources leak
Diffstat (limited to 'src/utils.h')
-rw-r--r-- | src/utils.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/utils.h b/src/utils.h index eb9d5bc..62d76f1 100644 --- a/src/utils.h +++ b/src/utils.h @@ -30,18 +30,13 @@ enum { USER_YESNO_YES = 1, }; -struct Lock { - char *path; - int fd; -}; - int user_yesno(int def, const char *fmt, ...); int systemf(const char *fmt, ...); FILE *popenf(const char *mode, const char *fmt, ...); char *shell_path_expand(const char *path); -struct Lock *device_lock(const char *path); -struct Lock *device_unlock(struct Lock *lock); +int device_lock(const char *path); +int device_unlock(int lock); int indexOfChar(const char *array, int len, char character); |