Lines Matching refs:NULL
76 INIT_CHECK_RETURN_VALUE(name != NULL, -1);
86 if (p == NULL) {
99 INIT_CHECK_RETURN_VALUE(name != NULL, -1);
109 if (data != NULL) {
112 while ((data = getgrent()) != NULL) {
113 if ((data->gr_name != NULL) && (strcmp(data->gr_name, name) == 0)) {
128 char *buffer = NULL;
129 FILE *fd = NULL;
131 INIT_CHECK_RETURN_VALUE(configFile != NULL && *configFile != '\0', NULL);
138 if (fd == NULL) {
143 if (buffer == NULL) {
150 buffer = NULL;
156 if (fd != NULL) {
158 fd = NULL;
183 if (fileName == NULL) {
184 return NULL;
186 char *buffer = NULL;
189 INIT_ERROR_CHECK(fd >= 0, return NULL, "Failed to read file %s errno:%d", fileName, errno);
191 INIT_ERROR_CHECK(buffer != NULL, close(fd);
192 return NULL, "Failed to allocate memory for %s", fileName);
196 return NULL, "Failed to read data for %s", fileName);
210 if ((src == NULL) || (iterator == NULL)) {
218 if (seperator == NULL) {
221 tmp = NULL;
229 if (seperator == NULL) {
242 } while (tmp != NULL);
249 INIT_ERROR_CHECK(name != NULL && buffer != NULL && value != NULL, return -1, "Failed get parameters");
253 if (tmp == NULL) {
298 INIT_CHECK_RETURN_VALUE(srcPtr != NULL && dstPtr != NULL && del != NULL, -1);
299 char *buf = NULL;
302 while ((counter < maxNum) && (dstPtr[counter] != NULL)) {
307 dstPtr[counter] = strtok_r(NULL, del, &buf);
314 if (vector != NULL) {
316 if (vector[i] != NULL) {
326 INIT_CHECK_RETURN_VALUE((maxItemCount >= 0) && (buffer != NULL) && (del != NULL) && (returnCount != NULL), NULL);
338 INIT_ERROR_CHECK(items != NULL, return NULL, "No enough memory to store items");
339 char *rest = NULL;
342 while (p != NULL) {
347 INIT_ERROR_CHECK(expand != NULL, FreeStringVector(items, count);
348 return NULL, "Failed to expand memory");
353 INIT_CHECK(items[count] != NULL, FreeStringVector(items, count);
354 return NULL);
358 return NULL;
361 p = strtok_r(NULL, del, &rest);
402 INIT_CHECK_RETURN_VALUE(buffer != NULL && fd >= 0 && *buffer != '\0', 0);
422 INIT_CHECK_RETURN_VALUE(source != NULL, NULL);
423 char *path = realpath(source, NULL);
424 if (path == NULL) {
425 INIT_ERROR_CHECK(errno == ENOENT, return NULL, "Failed to resolve %s real path err=%d", source, errno);
433 if (dir == NULL || *dir == '\0') {
448 const char *p = NULL;
449 if (dir == NULL || *dir == '\0') {
455 while (slash != NULL) {
476 if (fileName == NULL || *fileName == '\0') {
480 if (path == NULL) {
519 if (str == NULL || *str == '\0') {
523 int value = (int)strtoul(str, NULL, DECIMAL_BASE);
530 INIT_CHECK_RETURN_VALUE(dirPath != NULL && processFile != NULL, -1);
532 INIT_ERROR_CHECK(pDir != NULL, return -1, "Read dir :%s failed.%d", dirPath, errno);
534 INIT_ERROR_CHECK(fileName != NULL, closedir(pDir);
539 while ((dp = readdir(pDir)) != NULL) {
543 if (includeExt != NULL) {
545 if (tmp == NULL) {
601 INIT_ERROR_CHECK(strl != NULL, return -1, "Invalid parament");
662 INIT_ERROR_CHECK(str != NULL && out != NULL, return -1, "Invalid parament");
672 char *end = NULL;
685 INIT_ERROR_CHECK(str != NULL && out != NULL, return -1, "Invalid parament");
692 char *end = NULL;
727 BEGET_ERROR_CHECK(buffer != NULL, return -1, "Failed to read /proc/cmdline");
751 if ((strArray == NULL) || (target == NULL) || (target[0] == '\0')) {
759 for (i = 0; strArray[i] != NULL; i++) {
764 if (extend == NULL) {
768 while (extend[idx] != NULL) {
779 return OH_ExtendableStrArrayGetIndex(strArray, target, ignoreCase, NULL);
788 if ((strDict == NULL) || dictSize < 0 || ((size_t)dictSize < sizeof(const char *)) ||
789 (target == NULL) || (target[0] == '\0')) {
790 return NULL;
799 while (*(const char **)pos != NULL) {
806 if (extendStrDict == NULL) {
807 return NULL;
810 while (*(const char **)pos != NULL) {
817 return NULL;
822 return OH_ExtendableStrDictGet(strDict, dictSize, target, ignoreCase, NULL);
829 if (uptime == NULL) {