summaryrefslogtreecommitdiffstats
path: root/src/image/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/image/script.c')
-rw-r--r--src/image/script.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/image/script.c b/src/image/script.c
index b34df1e2..49b35640 100644
--- a/src/image/script.c
+++ b/src/image/script.c
@@ -311,6 +311,7 @@ static int terminate_on_label_found ( int rc ) {
* @ret rc Return status code
*/
static int goto_exec ( int argc, char **argv ) {
+ struct image *image = current_image.image;
struct goto_options opts;
size_t saved_offset;
int rc;
@@ -320,7 +321,7 @@ static int goto_exec ( int argc, char **argv ) {
return rc;
/* Sanity check */
- if ( ! current_image ) {
+ if ( ! image ) {
rc = -ENOTTY;
printf ( "Not in a script: %s\n", strerror ( rc ) );
return rc;
@@ -331,10 +332,10 @@ static int goto_exec ( int argc, char **argv ) {
/* Find label */
saved_offset = script_offset;
- if ( ( rc = process_script ( current_image, goto_find_label,
+ if ( ( rc = process_script ( image, goto_find_label,
terminate_on_label_found ) ) != 0 ) {
script_offset = saved_offset;
- DBGC ( current_image, "[%04zx] No such label :%s\n",
+ DBGC ( image, "[%04zx] No such label :%s\n",
script_offset, goto_label );
return rc;
}