Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions osc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2729,17 +2729,18 @@ static int osc_read_enclosed_value(struct iio_context *_ctx,
const char *plus = strstr(value, " + "),
*minus = strstr(value, " - ");
size_t len = strlen(value);
gchar *ptr, *val;
const gchar *ptr;
gchar *val;
long long val_left, val_right;
int ret;

if (value[0] != '{' || value[len - 1] != '}')
return -EINVAL;

if (!plus && !minus) {
ptr = g_strndup(value + 1, len - 2);
ret = osc_read_nonenclosed_value(_ctx, ptr, out);
g_free(ptr);
gchar *local_ptr = g_strndup(value + 1, len - 2);
ret = osc_read_nonenclosed_value(_ctx, local_ptr, out);
g_free(local_ptr);
return ret;
}

Expand Down
2 changes: 1 addition & 1 deletion xml_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ char **get_xml_list(char * buf_dir_name, int *list_size)
const struct dirent *ent;
DIR *d;
char **list = NULL, **list1 = NULL;
char *extension_ptr;
const char *extension_ptr;
int cnt = 0;
int n = 0;

Expand Down
Loading