From: ol.sc 
Date: Sun, 4 Nov 2012 20:23:50 +0000 (+0000)
Subject: Use array type declaration to avoid &-operator.
X-Git-Tag: V2.14~164
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e7d5f26863a0c23e36eb608f05eefdae8b531c09;p=cc65
Use array type declaration to avoid &-operator.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5910 b7a2c559-68d2-44c3-8de9-860c34a00d81
---
diff --git a/samples/overlaydemo.c b/samples/overlaydemo.c
index 9b049e9ef..70a35f11d 100644
--- a/samples/overlaydemo.c
+++ b/samples/overlaydemo.c
@@ -13,9 +13,9 @@
 #include 
 
 
-extern void _OVERLAY1_LOAD__, _OVERLAY1_SIZE__;
-extern void _OVERLAY2_LOAD__, _OVERLAY2_SIZE__;
-extern void _OVERLAY3_LOAD__, _OVERLAY3_SIZE__;
+extern void _OVERLAY1_LOAD__[], _OVERLAY1_SIZE__[];
+extern void _OVERLAY2_LOAD__[], _OVERLAY2_SIZE__[];
+extern void _OVERLAY3_LOAD__[], _OVERLAY3_SIZE__[];
 
 
 /* Functions resident in an overlay can call back functions resident in the
@@ -89,7 +89,7 @@ void main (void)
      * linker. They contain the overlay area address and size specific to a
      * certain program.
      */
-    if (loadfile ("ovrldemo.1", &_OVERLAY1_LOAD__, &_OVERLAY1_SIZE__)) {
+    if (loadfile ("ovrldemo.1", _OVERLAY1_LOAD__, _OVERLAY1_SIZE__)) {
 
         /* The linker makes sure that the call to foo() ends up at the right mem
          * addr. However it's up to user to make sure that the - right - overlay
@@ -103,12 +103,12 @@ void main (void)
     /* Replacing one overlay with another one can only happen from the main
      * program. This implies that an overlay can never load another overlay.
      */
-    if (loadfile ("ovrldemo.2", &_OVERLAY2_LOAD__, &_OVERLAY2_SIZE__)) {
+    if (loadfile ("ovrldemo.2", _OVERLAY2_LOAD__, _OVERLAY2_SIZE__)) {
         bar ();
     }
 
     log ("Calling overlay 3 from main");
-    if (loadfile ("ovrldemo.3", &_OVERLAY3_LOAD__, &_OVERLAY3_SIZE__)) {
+    if (loadfile ("ovrldemo.3", _OVERLAY3_LOAD__, _OVERLAY3_SIZE__)) {
         foobar ();
     }