{"action":"created","comment":{"url":"https://api.github.com/repos/danmar/cppcheck/pulls/comments/83537591","pull_request_review_id":4377243,"id":83537591,"diff_hunk":"@@ -184,13 +184,12 @@ static void addFiles2(std::map<std::string, std::size_t> &files,\n             if (!dir)\n                 return;\n \n-            dirent entry;\n             dirent * dir_result;\n \n             std::string new_path;\n             new_path.reserve(path.length() + 100);// prealloc some memory to avoid constant new/deletes in loop\n \n-            while ((readdir_r(dir, &entry, &dir_result) == 0) && (dir_result != NULL)) {\n+            while ((dir_result = readdir(dir)) && (dir_result != NULL)) {","path":"cli/filelister.cpp","position":11,"original_position":11,"commit_id":"7082f7ca81e2766f3d29272ce67b8ca18a1f3d04","original_commit_id":"7082f7ca81e2766f3d29272ce67b8ca18a1f3d04","user":{"login":"jelly","id":67428,"avatar_url":"https://avatars.githubusercontent.com/u/67428?v=3","gravatar_id":"","url":"https://api.github.com/users/jelly","html_url":"https://github.com/jelly","followers_url":"https://api.github.com/users/jelly/followers","following_url":"https://api.github.com/users/jelly/following{/other_user}","gists_url":"https://api.github.com/users/jelly/gists{/gist_id}","starred_url":"https://api.github.com/users/jelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelly/subscriptions","organizations_url":"https://api.github.com/users/jelly/orgs","repos_url":"https://api.github.com/users/jelly/repos","events_url":"https://api.github.com/users/jelly/events{/privacy}","received_events_url":"https://api.github.com/users/jelly/received_events","type":"User","site_admin":false},"body":"How do you propose to simplify the condiition?","created_at":"2016-10-15T18:38:22Z","updated_at":"2016-10-15T18:38:22Z","html_url":"https://github.com/danmar/cppcheck/pull/836#discussion_r83537591","pull_request_url":"https://api.github.com/repos/danmar/cppcheck/pulls/836","_links":{"self":{"href":"https://api.github.com/repos/danmar/cppcheck/pulls/comments/83537591"},"html":{"href":"https://github.com/danmar/cppcheck/pull/836#discussion_r83537591"},"pull_request":{"href":"https://api.github.com/repos/danmar/cppcheck/pulls/836"}}},"pull_request":{"url":"https://api.github.com/repos/danmar/cppcheck/pulls/836","id":88851337,"html_url":"https://github.com/danmar/cppcheck/pull/836","diff_url":"https://github.com/danmar/cppcheck/pull/836.diff","patch_url":"https://github.com/danmar/cppcheck/pull/836.patch","issue_url":"https://api.github.com/repos/danmar/cppcheck/issues/836","number":836,"state":"open","locked":false,"title":"readdir_r is deprecated in glibc 2.24","user":{"login":"jelly","id":67428,"avatar_url":"https://avatars.githubusercontent.com/u/67428?v=3","gravatar_id":"","url":"https://api.github.com/users/jelly","html_url":"https://github.com/jelly","followers_url":"https://api.github.com/users/jelly/followers","following_url":"https://api.github.com/users/jelly/following{/other_user}","gists_url":"https://api.github.com/users/jelly/gists{/gist_id}","starred_url":"https://api.github.com/users/jelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelly/subscriptions","organizations_url":"https://api.github.com/users/jelly/orgs","repos_url":"https://api.github.com/users/jelly/repos","events_url":"https://api.github.com/users/jelly/events{/privacy}","received_events_url":"https://api.github.com/users/jelly/received_events","type":"User","site_admin":false},"body":"Replace readdir_r with readdir since it has been marked for deprecation\r\nsince glibc 2.24.\r\n\r\nSee:\r\nhttps://sourceware.org/ml/libc-alpha/2016-02/msg00093.html\r\nhttps://womble.decadent.org.uk/readdir_r-advisory.html","created_at":"2016-10-11T15:10:41Z","updated_at":"2016-10-15T18:38:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"285b4cc59ab05a9d5fdab75d06b9658237f0c0ea","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/danmar/cppcheck/pulls/836/commits","review_comments_url":"https://api.github.com/repos/danmar/cppcheck/pulls/836/comments","review_comment_url":"https://api.github.com/repos/danmar/cppcheck/pulls/comments{/number}","comments_url":"https://api.github.com/repos/danmar/cppcheck/issues/836/comments","statuses_url":"https://api.github.com/repos/danmar/cppcheck/statuses/7082f7ca81e2766f3d29272ce67b8ca18a1f3d04","head":{"label":"jelly:deprecate_readdir_t","ref":"deprecate_readdir_t","sha":"7082f7ca81e2766f3d29272ce67b8ca18a1f3d04","user":{"login":"jelly","id":67428,"avatar_url":"https://avatars.githubusercontent.com/u/67428?v=3","gravatar_id":"","url":"https://api.github.com/users/jelly","html_url":"https://github.com/jelly","followers_url":"https://api.github.com/users/jelly/followers","following_url":"https://api.github.com/users/jelly/following{/other_user}","gists_url":"https://api.github.com/users/jelly/gists{/gist_id}","starred_url":"https://api.github.com/users/jelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelly/subscriptions","organizations_url":"https://api.github.com/users/jelly/orgs","repos_url":"https://api.github.com/users/jelly/repos","events_url":"https://api.github.com/users/jelly/events{/privacy}","received_events_url":"https://api.github.com/users/jelly/received_events","type":"User","site_admin":false},"repo":{"id":70602613,"name":"cppcheck","full_name":"jelly/cppcheck","owner":{"login":"jelly","id":67428,"avatar_url":"https://avatars.githubusercontent.com/u/67428?v=3","gravatar_id":"","url":"https://api.github.com/users/jelly","html_url":"https://github.com/jelly","followers_url":"https://api.github.com/users/jelly/followers","following_url":"https://api.github.com/users/jelly/following{/other_user}","gists_url":"https://api.github.com/users/jelly/gists{/gist_id}","starred_url":"https://api.github.com/users/jelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelly/subscriptions","organizations_url":"https://api.github.com/users/jelly/orgs","repos_url":"https://api.github.com/users/jelly/repos","events_url":"https://api.github.com/users/jelly/events{/privacy}","received_events_url":"https://api.github.com/users/jelly/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jelly/cppcheck","description":"static analysis of C/C++ code","fork":true,"url":"https://api.github.com/repos/jelly/cppcheck","forks_url":"https://api.github.com/repos/jelly/cppcheck/forks","keys_url":"https://api.github.com/repos/jelly/cppcheck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jelly/cppcheck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jelly/cppcheck/teams","hooks_url":"https://api.github.com/repos/jelly/cppcheck/hooks","issue_events_url":"https://api.github.com/repos/jelly/cppcheck/issues/events{/number}","events_url":"https://api.github.com/repos/jelly/cppcheck/events","assignees_url":"https://api.github.com/repos/jelly/cppcheck/assignees{/user}","branches_url":"https://api.github.com/repos/jelly/cppcheck/branches{/branch}","tags_url":"https://api.github.com/repos/jelly/cppcheck/tags","blobs_url":"https://api.github.com/repos/jelly/cppcheck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jelly/cppcheck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jelly/cppcheck/git/refs{/sha}","trees_url":"https://api.github.com/repos/jelly/cppcheck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jelly/cppcheck/statuses/{sha}","languages_url":"https://api.github.com/repos/jelly/cppcheck/languages","stargazers_url":"https://api.github.com/repos/jelly/cppcheck/stargazers","contributors_url":"https://api.github.com/repos/jelly/cppcheck/contributors","subscribers_url":"https://api.github.com/repos/jelly/cppcheck/subscribers","subscription_url":"https://api.github.com/repos/jelly/cppcheck/subscription","commits_url":"https://api.github.com/repos/jelly/cppcheck/commits{/sha}","git_commits_url":"https://api.github.com/repos/jelly/cppcheck/git/commits{/sha}","comments_url":"https://api.github.com/repos/jelly/cppcheck/comments{/number}","issue_comment_url":"https://api.github.com/repos/jelly/cppcheck/issues/comments{/number}","contents_url":"https://api.github.com/repos/jelly/cppcheck/contents/{+path}","compare_url":"https://api.github.com/repos/jelly/cppcheck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jelly/cppcheck/merges","archive_url":"https://api.github.com/repos/jelly/cppcheck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jelly/cppcheck/downloads","issues_url":"https://api.github.com/repos/jelly/cppcheck/issues{/number}","pulls_url":"https://api.github.com/repos/jelly/cppcheck/pulls{/number}","milestones_url":"https://api.github.com/repos/jelly/cppcheck/milestones{/number}","notifications_url":"https://api.github.com/repos/jelly/cppcheck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jelly/cppcheck/labels{/name}","releases_url":"https://api.github.com/repos/jelly/cppcheck/releases{/id}","deployments_url":"https://api.github.com/repos/jelly/cppcheck/deployments","created_at":"2016-10-11T14:35:49Z","updated_at":"2016-10-11T14:35:52Z","pushed_at":"2016-10-11T15:10:16Z","git_url":"git://github.com/jelly/cppcheck.git","ssh_url":"git@github.com:jelly/cppcheck.git","clone_url":"https://github.com/jelly/cppcheck.git","svn_url":"https://github.com/jelly/cppcheck","homepage":"http://cppcheck.sourceforge.net/","size":50554,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"danmar:master","ref":"master","sha":"fe08abb76f496b34f4dd8094c9b3917eb87be7df","user":{"login":"danmar","id":60195,"avatar_url":"https://avatars.githubusercontent.com/u/60195?v=3","gravatar_id":"","url":"https://api.github.com/users/danmar","html_url":"https://github.com/danmar","followers_url":"https://api.github.com/users/danmar/followers","following_url":"https://api.github.com/users/danmar/following{/other_user}","gists_url":"https://api.github.com/users/danmar/gists{/gist_id}","starred_url":"https://api.github.com/users/danmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danmar/subscriptions","organizations_url":"https://api.github.com/users/danmar/orgs","repos_url":"https://api.github.com/users/danmar/repos","events_url":"https://api.github.com/users/danmar/events{/privacy}","received_events_url":"https://api.github.com/users/danmar/received_events","type":"User","site_admin":false},"repo":{"id":143131,"name":"cppcheck","full_name":"danmar/cppcheck","owner":{"login":"danmar","id":60195,"avatar_url":"https://avatars.githubusercontent.com/u/60195?v=3","gravatar_id":"","url":"https://api.github.com/users/danmar","html_url":"https://github.com/danmar","followers_url":"https://api.github.com/users/danmar/followers","following_url":"https://api.github.com/users/danmar/following{/other_user}","gists_url":"https://api.github.com/users/danmar/gists{/gist_id}","starred_url":"https://api.github.com/users/danmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danmar/subscriptions","organizations_url":"https://api.github.com/users/danmar/orgs","repos_url":"https://api.github.com/users/danmar/repos","events_url":"https://api.github.com/users/danmar/events{/privacy}","received_events_url":"https://api.github.com/users/danmar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danmar/cppcheck","description":"static analysis of C/C++ code","fork":false,"url":"https://api.github.com/repos/danmar/cppcheck","forks_url":"https://api.github.com/repos/danmar/cppcheck/forks","keys_url":"https://api.github.com/repos/danmar/cppcheck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danmar/cppcheck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danmar/cppcheck/teams","hooks_url":"https://api.github.com/repos/danmar/cppcheck/hooks","issue_events_url":"https://api.github.com/repos/danmar/cppcheck/issues/events{/number}","events_url":"https://api.github.com/repos/danmar/cppcheck/events","assignees_url":"https://api.github.com/repos/danmar/cppcheck/assignees{/user}","branches_url":"https://api.github.com/repos/danmar/cppcheck/branches{/branch}","tags_url":"https://api.github.com/repos/danmar/cppcheck/tags","blobs_url":"https://api.github.com/repos/danmar/cppcheck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danmar/cppcheck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danmar/cppcheck/git/refs{/sha}","trees_url":"https://api.github.com/repos/danmar/cppcheck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danmar/cppcheck/statuses/{sha}","languages_url":"https://api.github.com/repos/danmar/cppcheck/languages","stargazers_url":"https://api.github.com/repos/danmar/cppcheck/stargazers","contributors_url":"https://api.github.com/repos/danmar/cppcheck/contributors","subscribers_url":"https://api.github.com/repos/danmar/cppcheck/subscribers","subscription_url":"https://api.github.com/repos/danmar/cppcheck/subscription","commits_url":"https://api.github.com/repos/danmar/cppcheck/commits{/sha}","git_commits_url":"https://api.github.com/repos/danmar/cppcheck/git/commits{/sha}","comments_url":"https://api.github.com/repos/danmar/cppcheck/comments{/number}","issue_comment_url":"https://api.github.com/repos/danmar/cppcheck/issues/comments{/number}","contents_url":"https://api.github.com/repos/danmar/cppcheck/contents/{+path}","compare_url":"https://api.github.com/repos/danmar/cppcheck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danmar/cppcheck/merges","archive_url":"https://api.github.com/repos/danmar/cppcheck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danmar/cppcheck/downloads","issues_url":"https://api.github.com/repos/danmar/cppcheck/issues{/number}","pulls_url":"https://api.github.com/repos/danmar/cppcheck/pulls{/number}","milestones_url":"https://api.github.com/repos/danmar/cppcheck/milestones{/number}","notifications_url":"https://api.github.com/repos/danmar/cppcheck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danmar/cppcheck/labels{/name}","releases_url":"https://api.github.com/repos/danmar/cppcheck/releases{/id}","deployments_url":"https://api.github.com/repos/danmar/cppcheck/deployments","created_at":"2009-03-04T20:16:45Z","updated_at":"2016-10-15T18:27:44Z","pushed_at":"2016-10-15T17:09:31Z","git_url":"git://github.com/danmar/cppcheck.git","ssh_url":"git@github.com:danmar/cppcheck.git","clone_url":"https://github.com/danmar/cppcheck.git","svn_url":"https://github.com/danmar/cppcheck","homepage":"http://cppcheck.sourceforge.net/","size":60366,"stargazers_count":1043,"watchers_count":1043,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":378,"mirror_url":null,"open_issues_count":7,"forks":378,"open_issues":7,"watchers":1043,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/danmar/cppcheck/pulls/836"},"html":{"href":"https://github.com/danmar/cppcheck/pull/836"},"issue":{"href":"https://api.github.com/repos/danmar/cppcheck/issues/836"},"comments":{"href":"https://api.github.com/repos/danmar/cppcheck/issues/836/comments"},"review_comments":{"href":"https://api.github.com/repos/danmar/cppcheck/pulls/836/comments"},"review_comment":{"href":"https://api.github.com/repos/danmar/cppcheck/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/danmar/cppcheck/pulls/836/commits"},"statuses":{"href":"https://api.github.com/repos/danmar/cppcheck/statuses/7082f7ca81e2766f3d29272ce67b8ca18a1f3d04"}}}}
{"actor":{"display_login":"jelly"}}