Commit Diff


commit - 7ddddcfe5914264936e21803c7356c31a014a813
commit + eafb23b106bd637594778531d6585272ca1ba2b7
blob - 0de69c3a775b77aa9277f24e2053da1b02f03f24
blob + 893d9e34bfc908952668c039fdb4a957c591e32e
--- client.c
+++ client.c
@@ -76,7 +76,7 @@ static void		client_privdrop(const char *, const char 
 static int		client_send_listener(int, const void *, uint16_t);
 
 static int		 qid_update_stat(struct qid *);
-static struct qid	*new_qid(int);
+static struct qid	*qid_from_fd(int);
 static struct qid	*qid_incref(struct qid *);
 static void		 qid_decref(struct qid *);
 
@@ -352,7 +352,7 @@ qid_update_stat(struct qid *qid)
 
 /* creates a qid given a fd */
 static struct qid *
-new_qid(int fd)
+qid_from_fd(int fd)
 {
 	struct qid	*qid;
 
@@ -758,7 +758,7 @@ tattach(struct np_msg_header *hdr, const uint8_t *data
 	}
 	log_debug("attached %s", aname);
 
-	if ((qid = new_qid(fd)) == NULL) {
+	if ((qid = qid_from_fd(fd)) == NULL) {
 		close(fd);
 		np_error(hdr->tag, "no memory");
 		return;
@@ -912,8 +912,8 @@ twalk(struct np_msg_header *hdr, const uint8_t *data, 
 		fd = nfd;
 	}
 
-        if ((qid = new_qid(fd)) == NULL)
-		fatal("new_qid");
+        if ((qid = qid_from_fd(fd)) == NULL)
+		fatal("qid_from_fd");
 
 	if (nf == NULL) {
 		if ((nf = new_fid(qid, newfid)) == NULL)