{"action":"created","issue":{"url":"https://api.github.com/repos/contiki-os/contiki/issues/1605","repository_url":"https://api.github.com/repos/contiki-os/contiki","labels_url":"https://api.github.com/repos/contiki-os/contiki/issues/1605/labels{/name}","comments_url":"https://api.github.com/repos/contiki-os/contiki/issues/1605/comments","events_url":"https://api.github.com/repos/contiki-os/contiki/issues/1605/events","html_url":"https://github.com/contiki-os/contiki/pull/1605","id":149407103,"number":1605,"title":"Add typecast to native border router switch statement","user":{"login":"tonnenpinguin","id":9628825,"avatar_url":"https://avatars.githubusercontent.com/u/9628825?v=3","gravatar_id":"","url":"https://api.github.com/users/tonnenpinguin","html_url":"https://github.com/tonnenpinguin","followers_url":"https://api.github.com/users/tonnenpinguin/followers","following_url":"https://api.github.com/users/tonnenpinguin/following{/other_user}","gists_url":"https://api.github.com/users/tonnenpinguin/gists{/gist_id}","starred_url":"https://api.github.com/users/tonnenpinguin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonnenpinguin/subscriptions","organizations_url":"https://api.github.com/users/tonnenpinguin/orgs","repos_url":"https://api.github.com/users/tonnenpinguin/repos","events_url":"https://api.github.com/users/tonnenpinguin/events{/privacy}","received_events_url":"https://api.github.com/users/tonnenpinguin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-19T09:48:24Z","updated_at":"2016-04-19T11:26:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/contiki-os/contiki/pulls/1605","html_url":"https://github.com/contiki-os/contiki/pull/1605","diff_url":"https://github.com/contiki-os/contiki/pull/1605.diff","patch_url":"https://github.com/contiki-os/contiki/pull/1605.patch"},"body":"When running the native border router on my raspbian installation it would always fail because for some reason the while loop would not consider the statement to be true.\r\nMy best guess would be that the -1 value for a char is `0xFF` while the same for an int would be `0xFFFFFFFF`."},"comment":{"url":"https://api.github.com/repos/contiki-os/contiki/issues/comments/211867130","html_url":"https://github.com/contiki-os/contiki/pull/1605#issuecomment-211867130","issue_url":"https://api.github.com/repos/contiki-os/contiki/issues/1605","id":211867130,"user":{"login":"nfi","id":605024,"avatar_url":"https://avatars.githubusercontent.com/u/605024?v=3","gravatar_id":"","url":"https://api.github.com/users/nfi","html_url":"https://github.com/nfi","followers_url":"https://api.github.com/users/nfi/followers","following_url":"https://api.github.com/users/nfi/following{/other_user}","gists_url":"https://api.github.com/users/nfi/gists{/gist_id}","starred_url":"https://api.github.com/users/nfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfi/subscriptions","organizations_url":"https://api.github.com/users/nfi/orgs","repos_url":"https://api.github.com/users/nfi/repos","events_url":"https://api.github.com/users/nfi/events{/privacy}","received_events_url":"https://api.github.com/users/nfi/received_events","type":"User","site_admin":false},"created_at":"2016-04-19T11:26:49Z","updated_at":"2016-04-19T11:26:49Z","body":"Good catch but I think the problem is caused by `c` being a `char` instead of an `int`. `getopt()` returns an int so I think a nicer solution would be to change `c` to be an int instead of a char."}}