Commit 82d27a0d authored by Robert Wilhelm's avatar Robert Wilhelm Committed by Alexandre Julliard

vbscript: Use return_null in more places.

parent 9546953b
...@@ -848,9 +848,7 @@ static HRESULT Global_Hex(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt, VA ...@@ -848,9 +848,7 @@ static HRESULT Global_Hex(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt, VA
n = (WORD)V_I2(arg); n = (WORD)V_I2(arg);
break; break;
case VT_NULL: case VT_NULL:
if(res) return return_null(res);
V_VT(res) = VT_NULL;
return S_OK;
default: default:
hres = to_int(arg, &ret); hres = to_int(arg, &ret);
if(FAILED(hres)) if(FAILED(hres))
...@@ -889,9 +887,7 @@ static HRESULT Global_Oct(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt, VA ...@@ -889,9 +887,7 @@ static HRESULT Global_Oct(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt, VA
n = (WORD)V_I2(arg); n = (WORD)V_I2(arg);
break; break;
case VT_NULL: case VT_NULL:
if(res) return return_null(res);
V_VT(res) = VT_NULL;
return S_OK;
default: default:
hres = to_int(arg, &ret); hres = to_int(arg, &ret);
if(FAILED(hres)) if(FAILED(hres))
...@@ -1430,9 +1426,7 @@ static HRESULT Global_LCase(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt, ...@@ -1430,9 +1426,7 @@ static HRESULT Global_LCase(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt,
TRACE("%s\n", debugstr_variant(arg)); TRACE("%s\n", debugstr_variant(arg));
if(V_VT(arg) == VT_NULL) { if(V_VT(arg) == VT_NULL) {
if(res) return return_null(res);
V_VT(res) = VT_NULL;
return S_OK;
} }
hres = to_string(arg, &str); hres = to_string(arg, &str);
...@@ -1461,9 +1455,7 @@ static HRESULT Global_UCase(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt, ...@@ -1461,9 +1455,7 @@ static HRESULT Global_UCase(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt,
TRACE("%s\n", debugstr_variant(arg)); TRACE("%s\n", debugstr_variant(arg));
if(V_VT(arg) == VT_NULL) { if(V_VT(arg) == VT_NULL) {
if(res) return return_null(res);
V_VT(res) = VT_NULL;
return S_OK;
} }
hres = to_string(arg, &str); hres = to_string(arg, &str);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment