1. 30 5月, 2008 3 次提交
  2. 29 5月, 2008 7 次提交
  3. 27 5月, 2008 3 次提交
  4. 23 5月, 2008 8 次提交
  5. 22 5月, 2008 12 次提交
  6. 21 5月, 2008 1 次提交
  7. 20 5月, 2008 1 次提交
  8. 17 5月, 2008 2 次提交
  9. 16 5月, 2008 3 次提交
    • J
      * src/xml.c: Include "c-ctype.h". · a770c2ab
      Jim Meyering 提交于
      a770c2ab
    • J
      start using c-ctype functions · c1ee35af
      Jim Meyering 提交于
      Up to now, we've been avoiding ctype functions like isspace, isdigit,
      etc.  because they are locale-dependent.  Now that we have the c-ctype
      functions, we can start using *them*, to make the code more readable
      with changes like these:
      
      -        /* This may not work on EBCDIC. */
      -        if ((*p >= 'a' && *p <= 'z') ||
      -            (*p >= 'A' && *p <= 'Z') ||
      -            (*p >= '0' && *p <= '9'))
      +        if (c_isalnum(*p))
      
      -    while ((*cur >= '0') && (*cur <= '9')) {
      +    while (c_isdigit(*cur)) {
      
      Also, some macros in conf.c used names that conflicted with
      standard meaning of "BLANK" and "SPACE", so I've adjusted them
      to be in line with the definition of e.g., isblank.
      In addition, I've wrapped those statement macros with do {...} while (0),
      so that we can't forget the ";" after a use.  There was one like that
      already (fixed below).  The missing semicolon would mess up automatic
      indenting.
      * src/buf.c (virBufferURIEncodeString):
      * src/conf.c (IS_EOL, SKIP_BLANKS_AND_EOL, SKIP_BLANKS)
      (virConfParseLong, virConfParseValue, virConfParseName)
      (virConfParseSeparator, virConfParseStatement, IS_BLANK, IS_CHAR)
      (IS_DIGIT, IS_SPACE, SKIP_SPACES):
      * src/nodeinfo.c:
      * src/qemu_conf.c (qemudParseInterfaceXML):
      * src/qemu_driver.c (qemudDomainBlockStats):
      * src/sexpr.c:
      * src/stats_linux.c:
      * src/util.c (virParseNumber, virDiskNameToIndex):
      * src/uuid.c (hextobin, virUUIDParse):
      * src/virsh.c:
      * src/xml.c (parseCpuNumber, virParseCpuSet):
      c1ee35af
    • J
      avoid a double-free bug · 0dc23afb
      Jim Meyering 提交于
      * src/qemu_conf.c (qemudParseXML): Ensure that "obj" is either
      NULL or a valid malloc'd pointer before we might "goto error"
      where it is freed.
      0dc23afb