chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix a couple of issues found with llvm-analyze
[elogind.git]
/
src
/
cryptsetup
/
cryptsetup-generator.c
diff --git
a/src/cryptsetup/cryptsetup-generator.c
b/src/cryptsetup/cryptsetup-generator.c
index d0984242c803c53b52670014c5ae04799a6b7862..386714b4fd09e8ac67bec1f6854c9328993fa11e 100644
(file)
--- a/
src/cryptsetup/cryptsetup-generator.c
+++ b/
src/cryptsetup/cryptsetup-generator.c
@@
-303,8
+303,7
@@
static int parse_proc_cmdline(void) {
t = strv_append(arg_proc_cmdline_disks, word + 10);
if (!t) {
t = strv_append(arg_proc_cmdline_disks, word + 10);
if (!t) {
- log_error("Out of memory");
- r = -ENOMEM;
+ r = log_oom();
goto finish;
}
strv_free(arg_proc_cmdline_disks);
goto finish;
}
strv_free(arg_proc_cmdline_disks);
@@
-317,8
+316,7
@@
static int parse_proc_cmdline(void) {
t = strv_append(arg_proc_cmdline_disks, word + 13);
if (!t) {
t = strv_append(arg_proc_cmdline_disks, word + 13);
if (!t) {
- log_error("Out of memory");
- r = -ENOMEM;
+ r = log_oom();
goto finish;
}
strv_free(arg_proc_cmdline_disks);
goto finish;
}
strv_free(arg_proc_cmdline_disks);
@@
-376,11
+374,11
@@
int main(int argc, char *argv[]) {
if (startswith(p, "luks-"))
p += 5;
if (startswith(p, "luks-"))
p += 5;
- name = strappend("luks-",
*i
);
- device = strappend("UUID=",
*i
);
+ name = strappend("luks-",
p
);
+ device = strappend("UUID=",
p
);
if (!name || !device) {
if (!name || !device) {
- log_
error("Out of memory"
);
+ log_
oom(
);
r = EXIT_FAILURE;
free(name);
free(device);
r = EXIT_FAILURE;
free(name);
free(device);