Skip to contentSkip to conversation

mds/mdstypes.h: drop the unnecessary format string of snprintf

PATCH In review Jeff Liu 2 participants 3 messages Jun 27, 2016

lore
Share & tools
lore

Jeff Liu

author
#0 lore raw

PATCH 1/1 mds/mdstypes.h: drop the unnecessary format string of snprintf

Drop the unnecessary format string of snprintf

---
 src/mds/mdstypes.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/mds/mdstypes.h +1 -1
index c69a655..3414ecd 100644
@@ -741,7 +741,7 @@ struct dentry_key_t {
       uint64_t val(snapid);
       snprintf(b, sizeof(b), "%" PRIx64, val);
     } else {
-      snprintf(b, sizeof(b), "%s", "head");
+      snprintf(b, sizeof(b), "head");
     }
     ostringstream oss;
     oss << name << "_" << b;
Signature · 1 line
1.8.3.2
#1 lore raw

Please open a pull request at https://github.com/ceph/ceph

Regards
Yan, Zheng

Quoted 27 lines · Jeff Liu

Drop the unnecessary format string of snprintf

---
 src/mds/mdstypes.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/mds/mdstypes.h +1 -2
index c69a655..3414ecd 100644
@@ -741,7 +741,7 @@ struct dentry_key_t {
       uint64_t val(snapid);
       snprintf(b, sizeof(b), "%" PRIx64, val);
     } else {
-      snprintf(b, sizeof(b), "%s", "head");
+      snprintf(b, sizeof(b), "head");
     }
     ostringstream oss;
     oss << name << "_" << b;
--

1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#2 lore raw

Got it, thanks Zheng.

On 2016年06月27日 14:38, Yan, Zheng wrote:

Please open a pull request at https://github.com/ceph/ceph

Regards
Yan, Zheng

Quoted 23 lines · Jeff Liu

Drop the unnecessary format string of snprintf

---
 src/mds/mdstypes.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/mds/mdstypes.h +1 -2
index c69a655..3414ecd 100644
@@ -741,7 +741,7 @@ struct dentry_key_t {
       uint64_t val(snapid);
       snprintf(b, sizeof(b), "%" PRIx64, val);
     } else {
-      snprintf(b, sizeof(b), "%s", "head");
+      snprintf(b, sizeof(b), "head");
     }
     ostringstream oss;
     oss << name << "_" << b;
--

1.8.3.2

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 8 lines
Cheers,

Jeff Liu

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html