]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Hopefully correct code for C's strict aliasing rules
authorhenryk@ploetzli.ch <henryk@ploetzli.ch@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Tue, 8 Sep 2009 02:36:50 +0000 (02:36 +0000)
committerhenryk@ploetzli.ch <henryk@ploetzli.ch@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Tue, 8 Sep 2009 02:36:50 +0000 (02:36 +0000)
armsrc/appmain.c

index 78ab86912c779eb5b4b2db6cc182f3a4a439fea0..5377104e029dfef94c4940938a4c0e0f13969a35 100644 (file)
@@ -249,8 +249,8 @@ void SendVersion(void)
         * symbol _bootphase1_version_pointer, perform slight sanity checks on the
         * pointer, then use it.
         */
-       void *bootrom_version = *(void**)&_bootphase1_version_pointer;
-       if( bootrom_version < (void*)&_flash_start || bootrom_version >= (void*)&_flash_end ) {
+       char *bootrom_version = *(char**)&_bootphase1_version_pointer;
+       if( bootrom_version < &_flash_start || bootrom_version >= &_flash_end ) {
                DbpString("bootrom version information appears invalid");
        } else {
                FormatVersionInformation(temp, sizeof(temp), "bootrom: ", bootrom_version);
Impressum, Datenschutz