src/os/solaris/vm/attachListener_solaris.cpp

Print this page

        

*** 666,676 **** const char* probe = op->arg(0); if (probe == NULL || probe[0] == '\0') { out->print_cr("No probe specified"); return JNI_ERR; } else { ! int probe_typess = atoi(probe); if (errno) { out->print_cr("invalid probe type"); return JNI_ERR; } else { DTrace::enable_dprobes(probe_typess); --- 666,677 ---- const char* probe = op->arg(0); if (probe == NULL || probe[0] == '\0') { out->print_cr("No probe specified"); return JNI_ERR; } else { ! errno = 0; ! int probe_typess = (int)strtol(probe, (char **)NULL, 10); if (errno) { out->print_cr("invalid probe type"); return JNI_ERR; } else { DTrace::enable_dprobes(probe_typess);
*** 701,711 **** const char* name = op->arg(0); assert(name != NULL, "flag name should not be null"); bool flag = true; const char* arg1; if ((arg1 = op->arg(1)) != NULL) { ! flag = (atoi(arg1) != 0); if (errno) { out->print_cr("flag value has to be an integer"); return JNI_ERR; } } --- 702,713 ---- const char* name = op->arg(0); assert(name != NULL, "flag name should not be null"); bool flag = true; const char* arg1; if ((arg1 = op->arg(1)) != NULL) { ! errno = 0; ! flag = (strtol(arg1, (char **)NULL, 10) != 0); if (errno) { out->print_cr("flag value has to be an integer"); return JNI_ERR; } }