On Fri, 02 May 2008 17:15:55 -0700 Harvey Harrison <harvey.harrison@gmail.com> wrote:I dunno. Return-by-reference is a bit nasty and forces the compiler to generate extra code to put local storage into a stack slot rather than keeping it in a register. Does anyone actually test whether hex_to_foo returns -1? Probably not many. In which case it might be better to do u64 hex_to_u64(const char *buf); and, if we encounter a non-hex char, do a WARN_ON(1). One could legitimately do int c = hex_to_int(some_user_input); if (c < 0) { printk("user: you're an idiot\n"); } to perform validation and conversion in a single operation but I expect that such code is in the minority, and could be covered by running a separate bool is_hex_string(const char *bug, size_t nchars); beforehand? --
| Artem Bityutskiy | [PATCH take 2 06/28] UBIFS: add journal replay |
| Greg Kroah-Hartman | [PATCH 009/196] Chinese: add translation of sparse.txt |
| Gregory Haskins | [PATCH 0/2] [RFC] RT: Optionally allow IRQF_NODELAY on serial console |
| Andrew Morton | Re: [RFC/PATCH] Documentation of kernel messages |
git: | |
| ir0s | Local branch ahead of tracked remote branch but git push claims everything up-to-d... |
| Matthieu Moy | git push to a non-bare repository |
| Rocco Rutte | mercurial to git |
| Bill Lear | Git rescue mission |
| Sunnz | radeon driver in -current Xorg 7.2? |
| Neko | reliable, dd over simple ip network |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Siju George | This is what Linus Torvalds calls openBSD crowd |
| Inaky Perez-Gonzalez | [PATCH 00/39] merge request for WiMAX kernel stack and i2400m driver |
| Linus Torvalds | Re: [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Evgeniy Polyakov | Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison overwritten |
