Skip to content

Commit

Permalink
Fix ISO C naming violations of function names and header guards (valk…
Browse files Browse the repository at this point in the history
…ey-io#21)

* Update header guards after move of header files
* Fix ISO-C naming violation by renaming internal functions:
  * ..SetError()
  *  _valkeyClusterConnect()
  * __valkeyClusterAppendCommand()
  * __valkeyClusterGetReplyFromNode()
* Remove internal func __valkeyClusterGetReply()
* Remove internal func _valkeyClusterConnect2()

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
  • Loading branch information
bjosv authored and michael-grunder committed Aug 1, 2024
1 parent 665985f commit 831c53f
Show file tree
Hide file tree
Showing 9 changed files with 213 additions and 254 deletions.
6 changes: 3 additions & 3 deletions include/valkey/sockcompat.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef __SOCKCOMPAT_H
#define __SOCKCOMPAT_H
#ifndef VALKEY_SOCKCOMPAT_H
#define VALKEY_SOCKCOMPAT_H

#ifndef _WIN32
/* For POSIX systems we use the standard BSD socket API. */
Expand Down Expand Up @@ -92,4 +92,4 @@ int win32_valkeyKeepAlive(SOCKET sockfd, int interval_ms);
#endif /* VALKEY_SOCKCOMPAT_IMPLEMENTATION */
#endif /* _WIN32 */

#endif /* __SOCKCOMPAT_H */
#endif /* VALKEY_SOCKCOMPAT_H */
6 changes: 3 additions & 3 deletions include/valkey/valkeycluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef __HIRCLUSTER_H
#define __HIRCLUSTER_H
#ifndef VALKEYCLUSTER_H
#define VALKEYCLUSTER_H

#include "async.h"
#include "dict.h"
Expand Down Expand Up @@ -342,4 +342,4 @@ valkeyClusterNode *valkeyClusterGetNodeByKey(valkeyClusterContext *cc,
}
#endif

#endif
#endif /* VALKEYCLUSTER_H */
6 changes: 3 additions & 3 deletions include/valkey/valkeycluster_ssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __HIRCLUSTER_SSL_H
#define __HIRCLUSTER_SSL_H
#ifndef VALKEYCLUSTER_SSL_H
#define VALKEYCLUSTER_SSL_H

#include "valkeycluster.h"
#include "valkey_ssl.h"
Expand All @@ -46,4 +46,4 @@ int valkeyClusterSetOptionEnableSSL(valkeyClusterContext *cc,
}
#endif

#endif /* __HIRCLUSTER_SSL_H */
#endif /* VALKEYCLUSTER_SSL_H */
6 changes: 3 additions & 3 deletions src/adlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef __ADLIST_H__
#define __ADLIST_H__
#ifndef VALKEY_ADLIST_H
#define VALKEY_ADLIST_H

/* Node, List, and Iterator are the only data structures used currently. */

Expand Down Expand Up @@ -91,4 +91,4 @@ void listRotate(hilist *list);
#define AL_START_HEAD 0
#define AL_START_TAIL 1

#endif /* __ADLIST_H__ */
#endif /* VALKEY_ADLIST_H */
6 changes: 3 additions & 3 deletions src/command.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef __COMMAND_H_
#define __COMMAND_H_
#ifndef VALKEY_COMMAND_H
#define VALKEY_COMMAND_H

#include <stdint.h>

Expand Down Expand Up @@ -84,4 +84,4 @@ void valkey_parse_cmd(struct cmd *r);
struct cmd *command_get(void);
void command_destroy(struct cmd *command);

#endif
#endif /* VALKEY_COMMAND_H */
Loading

0 comments on commit 831c53f

Please sign in to comment.