[Bug 407] New: assign local vars and catch returncode

bugzilla at busybox.net bugzilla at busybox.net
Fri Jun 19 13:05:40 UTC 2009


https://bugs.busybox.net/show_bug.cgi?id=407

           Summary: assign local vars and catch returncode
           Product: Busybox
           Version: 1.13.x
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P5
         Component: Other
        AssignedTo: unassigned at busybox.net
        ReportedBy: busybox.20.bastian at spamgourmet.org
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0


OK:

myfunc ()
{
    VAR="$( return 1 )" || {
        some_error_trap
    }

    some_code
}


FAIL:

myfunc ()
{
    local VAR"$( return 1 )" || {
        some_error_trap
    }

    some_code
}

ofcourse 'return 1' means some action which
returns a returncode, but above code_snippet is a
good test. IMHO it should work, i see no reason
for not allowing that such style...(error_trap
is never reached in 2nd example)


-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list