Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 22 Apr 2002 13:07:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 22 Apr 2002 13:07:39 -0400 Received: from ns.suse.de ([213.95.15.193]:54029 "HELO Cantor.suse.de") by vger.kernel.org with SMTP id ; Mon, 22 Apr 2002 13:07:39 -0400 To: DJ Barrow Cc: linux-kernel@vger.kernel.org Subject: Re: novice coding in /linux/net/ipv4/util.c From: DJ Barrow In-Reply-To: <20020422151025Z314220-22651+13849@vger.kernel.org.suse.lists.linux.kernel> From: Andi Kleen Date: 22 Apr 2002 19:07:38 +0200 Message-ID: Lines: 20 X-Mailer: Gnus v5.7/Emacs 20.6 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org DJ Barrow writes: > This textbook peice of novice coding which has existed since 2.2.14. Even earlier I think BTW do you call libresolv novice coding too ? > For those who can't spot the error, please note that this function is > returning a static string, excellent stuff if you are hoping to reuse the > same function like the following > printk("%s %s\n",in_ntoa(addr1),in_ntoa(addr2)); That is why most of networking uses the NIPQUAD macro instead. Best would be probably to convert the few remaining users of in_ntoa to NIPQUAD and drop this function. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/