See CODING-STYLE for reference
err = kmod_elf_get_section(elf, section, &buf, &size);
if (err < 0)
return err;
+
strings = buf;
if (strings == NULL || size == 0)
return 0;
strings++;
size--;
}
+
if (size <= 1)
return 0;
last = i + 1;
continue;
}
+
count++;
last = i + 1;
}
+
if (strings[i - 1] != '\0')
count++;
a[count] = NULL;
itr = (char *)(a + count);
last = 0;
+
for (i = 0, count = 0; i < size; i++) {
if (strings[i] == '\0') {
size_t slen = i - last;
last = i + 1;
}
}
+
if (strings[i - 1] != '\0') {
size_t slen = i - last;
a[count] = itr;