mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-19 11:13:09 +00:00
Clean up problem with manager implementation of mmap where it was not testing against MAP_FAILED response.
Got rid of shadowed variable used in processign the mmap results. Change test of mmap results to compare against MAP_FAILED git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@189391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1967,7 +1967,7 @@ static int try_firmware(char *s)
|
||||
return -1;
|
||||
}
|
||||
fwh = (struct ast_iax2_firmware_header*)mmap(NULL, stbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
|
||||
if (fwh == (void *) -1) {
|
||||
if (fwh == MAP_FAILED) {
|
||||
ast_log(LOG_WARNING, "mmap failed: %s\n", strerror(errno));
|
||||
close(fd);
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user