mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Add noreturn and format annotations for Ncat logging functions.
This commit is contained in:
parent
f9867163da
commit
13c19f637e
1 changed files with 11 additions and 5 deletions
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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue