mirror of
https://github.com/nmap/nmap.git
synced 2025-12-26 01:19:03 +00:00
Add noreturn and format annotations for Ncat logging functions.
This commit is contained in:
16
ncat/util.h
16
ncat/util.h
@@ -115,14 +115,19 @@ void windows_init();
|
||||
|
||||
#include "sockaddr_u.h"
|
||||
|
||||
void loguser(const char *fmt, ...);
|
||||
void loguser_noprefix(const char *fmt, ...);
|
||||
void logdebug(const char *fmt, ...);
|
||||
void loguser(const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
void loguser_noprefix(const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
void logdebug(const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
/* handle errors */
|
||||
void die(char *);
|
||||
|
||||
void bye(const char *, ...);
|
||||
void bye(const char *, ...)
|
||||
__attribute__ ((noreturn))
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
/* zero out some memory, bzero() is deprecated */
|
||||
void zmem(void *, size_t);
|
||||
@@ -131,7 +136,8 @@ int strbuf_append(char **buf, size_t *size, size_t *offset, const char *s, size_
|
||||
|
||||
int strbuf_append_str(char **buf, size_t *size, size_t *offset, const char *s);
|
||||
|
||||
int strbuf_sprintf(char **buf, size_t *size, size_t *offset, const char *fmt, ...);
|
||||
int strbuf_sprintf(char **buf, size_t *size, size_t *offset, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 4, 5)));
|
||||
|
||||
char *mkstr(const char *start, const char *end);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user