mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: uri: Convert port number to unsigned integer
Negative ports don't make sense so use a unsigned integer.
This commit is contained in:
parent
e8b69016b1
commit
1f920b9f02
@ -1356,7 +1356,7 @@ void virStringTrimOptionalNewline(char *str)
|
|||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
virStringParsePort(const char *str,
|
virStringParsePort(const char *str,
|
||||||
int *port)
|
unsigned int *port)
|
||||||
{
|
{
|
||||||
unsigned int p = 0;
|
unsigned int p = 0;
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ char *virStringEncodeBase64(const uint8_t *buf, size_t buflen);
|
|||||||
void virStringTrimOptionalNewline(char *str);
|
void virStringTrimOptionalNewline(char *str);
|
||||||
|
|
||||||
int virStringParsePort(const char *str,
|
int virStringParsePort(const char *str,
|
||||||
int *port)
|
unsigned int *port)
|
||||||
ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
#endif /* __VIR_STRING_H__ */
|
#endif /* __VIR_STRING_H__ */
|
||||||
|
@ -42,7 +42,7 @@ struct _virURI {
|
|||||||
char *scheme; /* the URI scheme */
|
char *scheme; /* the URI scheme */
|
||||||
char *server; /* the server part */
|
char *server; /* the server part */
|
||||||
char *user; /* the user part */
|
char *user; /* the user part */
|
||||||
int port; /* the port number */
|
unsigned int port; /* the port number */
|
||||||
char *path; /* the path string */
|
char *path; /* the path string */
|
||||||
char *query; /* the query string */
|
char *query; /* the query string */
|
||||||
char *fragment; /* the fragment string */
|
char *fragment; /* the fragment string */
|
||||||
|
Loading…
Reference in New Issue
Block a user