Changeset c6c389ed in mainline for uspace/srv/devman/util.h


Ignore:
Timestamp:
2010-10-23T16:08:18Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
791f58c
Parents:
58b833c
Message:

Yet more cstyle in devman.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/util.h

    r58b833c rc6c389ed  
    5252        size_t len = 0;
    5353       
    54         while(*str != 0 && !isspace(*str)) {
     54        while(*str != '\0' && !isspace(*str)) {
    5555                len++;
    5656                str++;
    5757        }
     58
    5859        return len;
    5960}
     
    6162static inline void free_not_null(const void *ptr)
    6263{
    63         if (NULL != ptr)
     64        if (ptr != NULL)
    6465                free(ptr);
    6566}
     
    7172       
    7273        str = (char *) malloc(size);
    73         if (NULL != str)
     74        if (str != NULL)
    7475                str_cpy(str, size, s);
    7576        return str;
     
    7980{
    8081        while (*str) {
    81                 if (orig == *str)
     82                if (*str == orig)
    8283                        *str = repl;
    8384                str++;
Note: See TracChangeset for help on using the changeset viewer.