GitHub PullRequestReviewCommentEvent at 2014-02-11 12:58:42
Repository: RIOT
Actor: OlegHahm
Payload: {"comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/9622501","id":9622501,"diff_hunk":"@@ -0,0 +1,72 @@\n+/*\t$OpenBSD: fixunsdfdi.c,v 1.7 2005/08/08 08:05:35 espie Exp $ */\n+/*-\n+ * Copyright (c) 1992, 1993\n+ *\tThe Regents of the University of California.  All rights reserved.\n+ *\n+ * This software was developed by the Computer Systems Engineering group\n+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and\n+ * contributed to Berkeley.\n+ *\n+ * Redistribution and use in source and binary forms, with or without\n+ * modification, are permitted provided that the following conditions\n+ * are met:\n+ * 1. Redistributions of source code must retain the above copyright\n+ *    notice, this list of conditions and the following disclaimer.\n+ * 2. Redistributions in binary form must reproduce the above copyright\n+ *    notice, this list of conditions and the following disclaimer in the\n+ *    documentation and/or other materials provided with the distribution.\n+ * 3. Neither the name of the University nor the names of its contributors\n+ *    may be used to endorse or promote products derived from this software\n+ *    without specific prior written permission.\n+ *\n+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ * SUCH DAMAGE.\n+ */\n+\n+#include \"quad.h\"\n+\n+#define\tONE_FOURTH\t((int)1 << (INT_BITS - 2))\n+#define\tONE_HALF\t(ONE_FOURTH * 2.0)\n+#define\tONE\t\t(ONE_FOURTH * 4.0)\n+\n+/*\n+ * Convert double to (unsigned) quad.\n+ * Not sure what to do with negative numbers---for now, anything out\n+ * of range becomes UQUAD_MAX.\n+ */\n+u_quad_t\n+__fixunsdfdi(double x)\n+{\n+\tunion uu t;\n+\tunsigned int tmp;\n+\n+\tif (x < 0)\n+\t\treturn (UQUAD_MAX);\t/* ??? should be 0?  ERANGE??? */\n+#ifdef notdef\t\t\t\t/* this falls afoul of a GCC bug */\n+\tif (x >= UQUAD_MAX)\n+\t\treturn (UQUAD_MAX);\n+#else\t\t\t\t\t/* so we wire in 2^64-1 instead */\n+\tif (x >= 18446744073709551615.0)\t/* XXX */\n+\t\treturn (UQUAD_MAX);","path":"sys/quad_math/fixunsdfdi.c","position":59,"original_position":59,"commit_id":"fc738d0edd36579aca6531f9b3492582521ff71b","original_commit_id":"fc738d0edd36579aca6531f9b3492582521ff71b","user":{"login":"OlegHahm","id":1590423,"avatar_url":"https://gravatar.com/avatar/0352936c8f6b1e38b2b8aff5b685ddea?d=https%3A%2F%2Fidenticons.github.com%2Fecb60b9ea9284389c79610ec27201598.png&r=x","gravatar_id":"0352936c8f6b1e38b2b8aff5b685ddea","url":"https://api.github.com/users/OlegHahm","html_url":"https://github.com/OlegHahm","followers_url":"https://api.github.com/users/OlegHahm/followers","following_url":"https://api.github.com/users/OlegHahm/following{/other_user}","gists_url":"https://api.github.com/users/OlegHahm/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegHahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegHahm/subscriptions","organizations_url":"https://api.github.com/users/OlegHahm/orgs","repos_url":"https://api.github.com/users/OlegHahm/repos","events_url":"https://api.github.com/users/OlegHahm/events{/privacy}","received_events_url":"https://api.github.com/users/OlegHahm/received_events","type":"User","site_admin":false},"body":"missing braces","created_at":"2014-02-11T12:58:42Z","updated_at":"2014-02-11T12:58:42Z","html_url":"https://github.com/RIOT-OS/RIOT/pull/572#discussion_r9622501","pull_request_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/572","_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/9622501"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/572#discussion_r9622501"},"pull_request":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/572"}}}}