Added const char * in multiple places

This commit is contained in:
Olof hagsand 2020-07-02 19:25:48 +02:00
parent 0a985e6618
commit 593ed2ef3b
30 changed files with 138 additions and 136 deletions

View file

@ -63,8 +63,8 @@ int restconf_terminate(clicon_handle h);
int restconf_insert_attributes(cxobj *xdata, cvec *qvec);
int restconf_main_extension_cb(clicon_handle h, yang_stmt *yext, yang_stmt *ys);
/* also in restconf_handle.h */
char *restconf_param_get(clicon_handle h, char *param);
int restconf_param_set(clicon_handle h, char *param, char *val);
char *restconf_param_get(clicon_handle h, const char *param);
int restconf_param_set(clicon_handle h, const char *param, char *val);
#endif /* _CLIXON_RESTCONF_H_ */

View file

@ -42,9 +42,9 @@
* Prototypes
*/
#if defined(__GNUC__) && __GNUC__ >= 3
int restconf_reply_header(void *req, char *name, char *vfmt, ...) __attribute__ ((format (printf, 3, 4)));
int restconf_reply_header(void *req, char *name, const char *vfmt, ...) __attribute__ ((format (printf, 3, 4)));
#else
int restconf_reply_header(FCGX_Request *req, char *name, char *vfmt, ...);
int restconf_reply_header(FCGX_Request *req, char *name, const char *vfmt, ...);
#endif
int restconf_reply_send(void *req, int code, cbuf *cb);

View file

@ -90,7 +90,7 @@ restconf_reply_body_start(void *req0)
int
restconf_reply_header(void *req0,
char *name,
char *vfmt,
const char *vfmt,
...)
{
FCGX_Request *req = (FCGX_Request *)req0;

View file

@ -119,7 +119,7 @@ restconf_handle_exit(clicon_handle h)
*/
char *
restconf_param_get(clicon_handle h,
char *param)
const char *param)
{
struct restconf_handle *rh = handle(h);
@ -138,7 +138,7 @@ restconf_param_get(clicon_handle h,
*/
int
restconf_param_set(clicon_handle h,
char *param,
const char *param,
char *val)
{
struct restconf_handle *rh = handle(h);

View file

@ -44,8 +44,8 @@
*/
clicon_handle restconf_handle_init(void);
int restconf_handle_exit(clicon_handle h);
char *restconf_param_get(clicon_handle h, char *param);
int restconf_param_set(clicon_handle h, char *param, char *val);
char *restconf_param_get(clicon_handle h, const char *param);
int restconf_param_set(clicon_handle h, const char *param, char *val);
int restconf_param_del_all(clicon_handle h);
#endif /* _RESTCONF_HANDLE_H_ */