From: Simone Piccardi Date: Sat, 16 Aug 2003 18:11:24 +0000 (+0000) Subject: seconda prova X-Git-Url: https://gapil.gnulinux.it/gitweb/?a=commitdiff_plain;h=14378f73eec708d27dc29023cd11499b50818b7d;p=gapil.git seconda prova --- diff --git a/sources/endian.c b/sources/endian.c index 3c79ab0..be14e09 100644 --- a/sources/endian.c +++ b/sources/endian.c @@ -23,7 +23,7 @@ * Author: S. Piccardi * May. 2003 * - * $Id: endian.c,v 1.2 2003/08/16 17:36:03 piccardi Exp $ + * $Id: endian.c,v 1.3 2003/08/16 18:11:24 piccardi Exp $ * ***************************************************************/ #include @@ -35,15 +35,14 @@ int main(int argc, char *argv[]) */ int i, val; char buf[sizeof(int)]; - char * char_ptr; int * int_ptr; val = 0xABCDEF01; /* endianess magic number */ - int_ptr = (int *) buf; + int_ptr = (int *) buf; *int_ptr = val; - char_ptr = (char *) &val; + val = 0; for (i=0; i