From: Philippe E. <ph...@us...> - 2007-10-19 15:13:09
|
Update of /cvsroot/oprofile/oprofile/libop In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8505/libop Modified Files: Tag: JIT_SUPPORT op_events.c Log Message: Sync JIT_SUPPORT branch with HEAD Index: op_events.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/libop/op_events.c,v retrieving revision 1.83.2.1 retrieving revision 1.83.2.2 diff -u -p -d -r1.83.2.1 -r1.83.2.2 --- op_events.c 18 Oct 2007 17:56:58 -0000 1.83.2.1 +++ op_events.c 19 Oct 2007 15:13:09 -0000 1.83.2.2 @@ -49,7 +49,10 @@ static int parse_int(char const * str) static int parse_hex(char const * str) { int value; - if (sscanf(str, "%x", &value) != 1) + /* 0x/0X to force the use of hexa notation for field intended to + be in hexadecimal */ + if (sscanf(str, "0x%x", &value) != 1 && + sscanf(str, "0X%x", &value) != 1) parse_error("expected hexadecimal value"); return value; |