Constify a few more 'char *' parameters.
This commit is contained in:
parent
8233ff53ae
commit
8225e92175
8
device.c
8
device.c
|
@ -146,7 +146,7 @@ void sr_device_probe_clear(struct sr_device *device, int probenum)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sr_device_probe_add(struct sr_device *device, char *name)
|
void sr_device_probe_add(struct sr_device *device, const char *name)
|
||||||
{
|
{
|
||||||
struct sr_probe *p;
|
struct sr_probe *p;
|
||||||
char probename[16];
|
char probename[16];
|
||||||
|
@ -184,7 +184,8 @@ struct sr_probe *sr_device_probe_find(struct sr_device *device, int probenum)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: return SIGROK_ERR if probenum not found */
|
/* TODO: return SIGROK_ERR if probenum not found */
|
||||||
void sr_device_probe_name(struct sr_device *device, int probenum, char *name)
|
void sr_device_probe_name(struct sr_device *device, int probenum,
|
||||||
|
const char *name)
|
||||||
{
|
{
|
||||||
struct sr_probe *p;
|
struct sr_probe *p;
|
||||||
|
|
||||||
|
@ -216,7 +217,8 @@ void sr_device_trigger_clear(struct sr_device *device)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: return SIGROK_ERR if probenum not found */
|
/* TODO: return SIGROK_ERR if probenum not found */
|
||||||
void sr_device_trigger_set(struct sr_device *device, int probenum, char *trigger)
|
void sr_device_trigger_set(struct sr_device *device, int probenum,
|
||||||
|
const char *trigger)
|
||||||
{
|
{
|
||||||
struct sr_probe *p;
|
struct sr_probe *p;
|
||||||
|
|
||||||
|
|
2
filter.c
2
filter.c
|
@ -28,7 +28,7 @@
|
||||||
* unused probes removed.
|
* unused probes removed.
|
||||||
*/
|
*/
|
||||||
int filter_probes(int in_unitsize, int out_unitsize, int *probelist,
|
int filter_probes(int in_unitsize, int out_unitsize, int *probelist,
|
||||||
char *data_in, uint64_t length_in, char **data_out,
|
const char *data_in, uint64_t length_in, char **data_out,
|
||||||
uint64_t *length_out)
|
uint64_t *length_out)
|
||||||
{
|
{
|
||||||
unsigned int in_offset, out_offset;
|
unsigned int in_offset, out_offset;
|
||||||
|
|
|
@ -136,7 +136,7 @@ int sr_session_load(const char *filename)
|
||||||
return SR_OK;
|
return SR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sr_session_save(char *filename)
|
int sr_session_save(const char *filename)
|
||||||
{
|
{
|
||||||
GSList *l, *p, *d;
|
GSList *l, *p, *d;
|
||||||
FILE *meta;
|
FILE *meta;
|
||||||
|
|
|
@ -44,19 +44,20 @@ void sr_device_clear(struct sr_device *device);
|
||||||
void sr_device_destroy(struct sr_device *dev);
|
void sr_device_destroy(struct sr_device *dev);
|
||||||
|
|
||||||
void sr_device_probe_clear(struct sr_device *device, int probenum);
|
void sr_device_probe_clear(struct sr_device *device, int probenum);
|
||||||
void sr_device_probe_add(struct sr_device *device, char *name);
|
void sr_device_probe_add(struct sr_device *device, const char *name);
|
||||||
struct sr_probe *sr_device_probe_find(struct sr_device *device, int probenum);
|
struct sr_probe *sr_device_probe_find(struct sr_device *device, int probenum);
|
||||||
void sr_device_probe_name(struct sr_device *device, int probenum, char *name);
|
void sr_device_probe_name(struct sr_device *device, int probenum,
|
||||||
|
const char *name);
|
||||||
|
|
||||||
void sr_device_trigger_clear(struct sr_device *device);
|
void sr_device_trigger_clear(struct sr_device *device);
|
||||||
void sr_device_trigger_set(struct sr_device *device, int probenum,
|
void sr_device_trigger_set(struct sr_device *device, int probenum,
|
||||||
char *trigger);
|
const char *trigger);
|
||||||
gboolean sr_device_has_hwcap(struct sr_device *device, int hwcap);
|
gboolean sr_device_has_hwcap(struct sr_device *device, int hwcap);
|
||||||
|
|
||||||
/*--- filter.c --------------------------------------------------------------*/
|
/*--- filter.c --------------------------------------------------------------*/
|
||||||
|
|
||||||
int filter_probes(int in_unitsize, int out_unitsize, int *probelist,
|
int filter_probes(int in_unitsize, int out_unitsize, int *probelist,
|
||||||
char *data_in, uint64_t length_in, char **data_out,
|
const char *data_in, uint64_t length_in, char **data_out,
|
||||||
uint64_t *length_out);
|
uint64_t *length_out);
|
||||||
|
|
||||||
/*--- hwplugin.c ------------------------------------------------------------*/
|
/*--- hwplugin.c ------------------------------------------------------------*/
|
||||||
|
@ -118,7 +119,7 @@ void sr_session_halt(void);
|
||||||
void sr_session_stop(void);
|
void sr_session_stop(void);
|
||||||
void sr_session_bus(struct sr_device *device,
|
void sr_session_bus(struct sr_device *device,
|
||||||
struct sr_datafeed_packet *packet);
|
struct sr_datafeed_packet *packet);
|
||||||
int sr_session_save(char *filename);
|
int sr_session_save(const char *filename);
|
||||||
void sr_session_source_add(int fd, int events, int timeout,
|
void sr_session_source_add(int fd, int events, int timeout,
|
||||||
receive_data_callback callback, void *user_data);
|
receive_data_callback callback, void *user_data);
|
||||||
void sr_session_source_remove(int fd);
|
void sr_session_source_remove(int fd);
|
||||||
|
|
Loading…
Reference in New Issue