From owner-freebsd-questions Fri May 19 15:34:16 2000 Delivered-To: freebsd-questions@freebsd.org Received: from lince.tdnet.com.br (lince.tdnet.com.br [200.236.148.6]) by hub.freebsd.org (Postfix) with ESMTP id 23AA037B635 for ; Fri, 19 May 2000 15:34:06 -0700 (PDT) (envelope-from kernel@tdnet.com.br) Received: from tdnet.com.br [200.236.148.143] by lince.tdnet.com.br with ESMTP (SMTPD32-5.00) id A346ECB20154; Fri, 19 May 2000 18:33:58 -0300 Message-ID: <3925C207.789AC2AA@tdnet.com.br> Date: Fri, 19 May 2000 19:36:55 -0300 From: Gustavo Vieira Goncalves Coelho Rios X-Mailer: Mozilla 4.72 [en] (X11; I; FreeBSD 4.0-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: questions@freebsd.org Subject: strange error Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG What is the problem with this code. I simply can't figure out: #include #include char *a(char *); void t(char *); /* You should call it with at least one parameters, ex: ./a.out test */ void main(int argc, char *argv[]) { char *dir; ++argv; printf("%s\n", *argv); dir = a(*argv); t(dir); printf("%s\n", *dir); } void t(char *a) { while (*a) *a++ = '1'; } char * a(char *b) { return strdup(b); } -- Your mouse has moved. Windows NT must be restarted for the change to take effect! Reboot now? [ OK] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message