aboutsummaryrefslogtreecommitdiff
path: root/bfd/mach-o.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2017-01-03 15:26:27 +0000
committerNick Clifton <nickc@redhat.com>2017-01-03 15:26:27 +0000
commit09fe2662a708aa4da665bcaf942b5529e6809220 (patch)
tree36c8e608d3ca025248f788fb29a7908865f45d36 /bfd/mach-o.c
parentfb9b4b7e534c4df7e8e0cb60c180e61f27617f0a (diff)
downloadgdb-09fe2662a708aa4da665bcaf942b5529e6809220.zip
gdb-09fe2662a708aa4da665bcaf942b5529e6809220.tar.gz
gdb-09fe2662a708aa4da665bcaf942b5529e6809220.tar.bz2
Fix compile time warning about using a possibly uninitialised variable.
Diffstat (limited to 'bfd/mach-o.c')
-rw-r--r--bfd/mach-o.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index 8bf1149..edfac15 100644
--- a/bfd/mach-o.c
+++ b/bfd/mach-o.c
@@ -5641,9 +5641,9 @@ bfd_mach_o_core_file_failing_signal (bfd *abfd ATTRIBUTE_UNUSED)
static bfd_mach_o_uuid_command *
bfd_mach_o_lookup_uuid_command (bfd *abfd)
{
- bfd_mach_o_load_command *uuid_cmd;
+ bfd_mach_o_load_command *uuid_cmd = NULL;
int ncmd = bfd_mach_o_lookup_command (abfd, BFD_MACH_O_LC_UUID, &uuid_cmd);
- if (ncmd != 1)
+ if (ncmd != 1 || uuid_cmd == NULL)
return FALSE;
return &uuid_cmd->command.uuid;
}