All callers of get_op_bitspec() in Opcode.xs pass len, so don't call strlen().
authorNicholas Clark <nick@ccl4.org>
Mon, 1 Nov 2010 15:41:53 +0000 (15:41 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 1 Nov 2010 15:41:53 +0000 (15:41 +0000)
This commit brought to you by the campaign for elimination of strlen().

ext/Opcode/Opcode.xs

index 7ae6b33..4d6df48 100644 (file)
@@ -98,8 +98,6 @@ get_op_bitspec(pTHX_ const char *opname, STRLEN len, int fatal)
     SV **svp;
     dMY_CXT;
 
-    if (!len)
-       len = strlen(opname);
     svp = hv_fetch(op_named_bits, opname, len, 0);
     if (!svp || !SvOK(*svp)) {
        if (!fatal)